mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Federico Vaga <federico.vaga@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Pawel Osciak <pawel@osciak.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,
	Jonathan Corbet <corbet@lwn.net>
Subject: Re: [PATCH V4 2/3] sta2x11_vip: convert to videobuf2 and control framework
Date: Mon, 7 Jan 2013 10:46:43 +0100	[thread overview]
Message-ID: <201301071046.43331.hverkuil@xs4all.nl> (raw)
In-Reply-To: <1357493343-13090-2-git-send-email-federico.vaga@gmail.com>

Hi Frederico!

Just one comment, see below:

On Sun January 6 2013 18:29:02 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)
> 
> 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 | 1244 ++++++++++---------------------
>  2 file modificati, 414 inserzioni(+), 832 rimozioni(-)
> 
> diff --git a/drivers/media/pci/sta2x11/Kconfig b/drivers/media/pci/sta2x11/Kconfig
> index 6749f67..a94ccad 100644
> --- a/drivers/media/pci/sta2x11/Kconfig
> +++ b/drivers/media/pci/sta2x11/Kconfig
> @@ -2,7 +2,7 @@ config STA2X11_VIP
>  	tristate "STA2X11 VIP Video For Linux"
>  	depends on STA2X11
>  	select VIDEO_ADV7180 if MEDIA_SUBDRV_AUTOSELECT
> -	select VIDEOBUF_DMA_CONTIG
> +	select VIDEOBUF2_DMA_CONTIG
>  	depends on PCI && VIDEO_V4L2 && VIRT_TO_BUS
>  	help
>  	  Say Y for support for STA2X11 VIP (Video Input Port) capture
> diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
> index ed1337a..e379e03 100644
> --- a/drivers/media/pci/sta2x11/sta2x11_vip.c
> +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c

<snip>

> -/**
> - * vidioc_try_fmt_vid_cap - set video capture format
> - * @file: descriptor of device ( not used)
> - * @priv: points to current videodevice
> - * @f: new format
> - *
> - * new video format is set which includes width and
> - * field type. width is fixed to 720, no scaling.
> - * Only UYVY is supported by this hardware.
> - * the minimum height is 200, the maximum is 576 (PAL)
> - *
> - * return value: 0, no error
> - *
> - * -EINVAL, pixel or field format not supported
> - *
> - */
>  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;
> -

You should keep this check for now. See this discussion:

http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html

I'm going to change v4l2-compliance to make this a warning instead of an
error for now.

>  	if (V4L2_STD_525_60 & vip->std)
>  		interlace_lim = 240;
>  	else
>  		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;

After updating v4l2-compliance (I've just made the change to v4l2-compliance)
can you also post the output of v4l2-compliance for this driver?

Thanks,

	Hans

  reply	other threads:[~2013-01-07  9:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 17:29 [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags Federico Vaga
2013-01-06 17:29 ` [PATCH V4 2/3] sta2x11_vip: convert to videobuf2 and control framework Federico Vaga
2013-01-07  9:46   ` Hans Verkuil [this message]
2013-01-06 17:29 ` [PATCH V4 3/3] adv7180: remove {query/g_/s_}ctrl Federico Vaga
2013-01-08  6:53 ` [PATCH v4 1/3] videobuf2-dma-contig: user can specify GFP flags Marek Szyprowski
2013-01-08 10:15   ` Federico Vaga
2013-01-08 10:40     ` Marek Szyprowski
2013-01-08 14:58       ` 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=201301071046.43331.hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=corbet@lwn.net \
    --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 \
    --cc=pawel@osciak.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®