[media] media: vb2: set buffer length correctly for all buffer types
authorMarek Szyprowski <m.szyprowski@samsung.com>
Thu, 13 Oct 2011 10:07:24 +0000 (07:07 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 8 Nov 2011 11:05:23 +0000 (09:05 -0200)
v4l2_planes[plane].length field was not initialized for userptr buffers.
This patch fixes this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf2-core.c

index 9bb92145ad5a311f0bdf4d0d5df95c0fd1b57fc7..e7c52ff3c76138eb94601e9304bd85c2402b1fb1 100644 (file)
@@ -131,6 +131,7 @@ static void __setup_offsets(struct vb2_queue *q, unsigned int n)
                        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",