Hi Michael,
Thank you for the patch.
On Wednesday 28 May 2014 09:38:07 Michael Grzeschik wrote:
> Its not needed to set plane sizelimit if using USERPTR or DMABUF.
> The buffersize limit will be parsed in the encoder function.
I don't think this is correct. If you look at __qbuf_userptr() in videobuf2-
core.c for instance, vb2 makes sure the buffer being queued is large enough by
validating its length against the size set in the queue_setup() handler.
/* Check if the provided plane buffer is large enough */
if (planes[plane].length < q->plane_sizes[plane]) {
dprintk(1, "provided buffer size %u is less than "
"setup size %u for plane %d\n",
planes[plane].length,
q->plane_sizes[plane], plane);
ret = -EINVAL;
goto err;
}
> Signed-off-by: Michael Grzeschik <[email protected]>
> Signed-off-by: Philipp Zabel <[email protected]>
> ---
> drivers/usb/gadget/uvc_queue.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/uvc_queue.c
> index 0bb5d50..698c385 100644
> --- a/drivers/usb/gadget/uvc_queue.c
> +++ b/drivers/usb/gadget/uvc_queue.c
> @@ -52,7 +52,7 @@ static int uvc_queue_setup(struct vb2_queue *vq, const
> struct v4l2_format *fmt,
>
> *nplanes = 1;
>
> - sizes[0] = video->imagesize;
> + sizes[0] = (vq->memory == V4L2_MEMORY_MMAP) ? video->imagesize : 0;
>
> return 0;
> }
--
Regards,
Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html