Re: [RFCv1 PATCH 28/32] vivi: use vb2 helper functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hans,

Thanks for the patch.

On Sunday 10 June 2012 12:25:50 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> ---
>  drivers/media/video/vivi.c |  160 ++++++-----------------------------------
>  1 file changed, 21 insertions(+), 139 deletions(-)
> 
> diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c
> index 1e4da5e..1e8c4f3 100644
> --- a/drivers/media/video/vivi.c
> +++ b/drivers/media/video/vivi.c
> @@ -767,7 +767,13 @@ static int queue_setup(struct vb2_queue *vq, const
> struct v4l2_format *fmt, struct vivi_dev *dev = vb2_get_drv_priv(vq);
>  	unsigned long size;
> 
> -	size = dev->width * dev->height * dev->pixelsize;
> +	if (fmt)
> +		size = fmt->fmt.pix.sizeimage;
> +	else
> +		size = dev->width * dev->height * dev->pixelsize;
> +
> +	if (size == 0)
> +		return -EINVAL;

If I'm not mistaken, this is a bug fix to properly support CREATE_BUF, right ? 
If so it should be split to its own patch.

>  	if (0 == *nbuffers)
>  		*nbuffers = 32;

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux