From: Hans Verkuil <hverkuil@xs4all.nl>
To: Federico Vaga <federico.vaga@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Giancarlo Asnaghi <giancarlo.asnaghi@st.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/2] sta2x11_vip: convert to videobuf2, control framework, file handler
Date: Mon, 4 Feb 2013 11:57:45 +0100 [thread overview]
Message-ID: <201302041157.45340.hverkuil@xs4all.nl> (raw)
In-Reply-To: <1358950027-27419-1-git-send-email-federico.vaga@gmail.com>
On Wed January 23 2013 15:07:06 Federico Vaga wrote:
> This patch re-write the driver and use the videobuf2
> interface instead of the old videobuf. Moreover, it uses also
> the control framework which allows the driver to inherit
> controls from its subdevice (ADV7180). Finally the driver does not
> implement custom file operation but it uses the generic ones from
> videobuf2 and v4l2_fh
>
> Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
> Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
> ---
> drivers/media/pci/sta2x11/Kconfig | 2 +-
> drivers/media/pci/sta2x11/sta2x11_vip.c | 1071 +++++++++++++------------------
> 2 file modificati, 432 inserzioni(+), 641 rimozioni(-)
>
> @@ -797,12 +601,11 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
> static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
> struct v4l2_format *f)
> {
> - struct video_device *dev = priv;
> - struct sta2x11_vip *vip = video_get_drvdata(dev);
> + struct sta2x11_vip *vip = video_drvdata(file);
> int interlace_lim;
>
> if (V4L2_PIX_FMT_UYVY != f->fmt.pix.pixelformat)
> - return -EINVAL;
> + v4l2_warn(&vip->v4l2_dev, "Invalid format, only UYVY supported\n");
As mentioned in my v4 review, keep the return -EINVAL here. As long as it is
uncertain what try_fmt should do with unsupported pixelformats we shouldn't
change this behavior.
Regards,
Hans
>
> if (V4L2_STD_525_60 & vip->std)
> interlace_lim = 240;
> @@ -810,6 +613,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
> interlace_lim = 288;
>
> switch (f->fmt.pix.field) {
> + default:
> case V4L2_FIELD_ANY:
> if (interlace_lim < f->fmt.pix.height)
> f->fmt.pix.field = V4L2_FIELD_INTERLACED;
> @@ -823,10 +627,10 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
> break;
> case V4L2_FIELD_INTERLACED:
> break;
> - default:
> - return -EINVAL;
> }
>
> + /* It is the only supported format */
> + f->fmt.pix.pixelformat = V4L2_PIX_FMT_UYVY;
> f->fmt.pix.height &= ~1;
> if (2 * interlace_lim < f->fmt.pix.height)
> f->fmt.pix.height = 2 * interlace_lim;
next prev parent reply other threads:[~2013-02-04 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-23 14:07 Federico Vaga
2013-01-23 14:07 ` [PATCH v6 2/2] adv7180: remove {query/g_/s_}ctrl Federico Vaga
2013-02-04 10:57 ` Hans Verkuil [this message]
2013-02-05 18:34 ` [PATCH v6 1/2] sta2x11_vip: convert to videobuf2, control framework, file handler Federico Vaga
2013-02-06 9:49 ` Hans Verkuil
2013-02-06 14:26 ` Federico Vaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201302041157.45340.hverkuil@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=federico.vaga@gmail.com \
--cc=giancarlo.asnaghi@st.com \
--cc=hans.verkuil@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=mchehab@infradead.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®