Skip to content

Commit

Permalink
[media] media: vb2: set buffer length correctly for all buffer types
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marek Szyprowski authored and Mauro Carvalho Chehab committed Nov 8, 2011
1 parent 2c2dd6a commit 4907602
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/videobuf2-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4907602

Please sign in to comment.