Hello,

On Friday, October 14, 2011 2:54 PM Marek Szyprowski wrote:

> v4l2_planes[plane].length field was not initialized for userptr buffers.
> This patch fixes this issue.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>
> CC: Pawel Osciak <pa...@osciak.com>
> ---
>  drivers/media/video/videobuf2-core.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/videobuf2-core.c 
> b/drivers/media/video/videobuf2-core.c
> index d8affb8..5656fdf 100644
> --- a/drivers/media/video/videobuf2-core.c
> +++ b/drivers/media/video/videobuf2-core.c
> @@ -58,7 +58,6 @@ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb)
> 
>               /* Associate allocator private data with this plane */
>               vb->planes[plane].mem_priv = mem_priv;
> -             vb->v4l2_planes[plane].length = q->plane_sizes[plane];

After some more testing I've found that removing this assignment causes 
regression for drivers that use buf_init callback. I will resend this patch 
without removal of the above line.

>       }
> 
>       return 0;
> @@ -121,6 +120,7 @@ static void __setup_offsets(struct vb2_queue *q)
>                       continue;
> 
>               for (plane = 0; plane < vb->num_planes; ++plane) {
> +                     vb->v4l2_planes[plane].length = q->plane_sizes[plane];
>                       vb->v4l2_planes[plane].m.mem_offset = off;
> 
>                       dprintk(3, "Buffer %d, plane %d offset 0x%08lx\n",
> --

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center

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

Reply via email to