diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2011-10-13 12:07:24 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-08 12:05:23 +0100 |
commit | 4907602f85d454c127d20ac943ead13e2919898d (patch) | |
tree | 097da4672cb935b51badc36a411893ff0439c6bc /drivers/media/video | |
parent | [media] media: vb2: add a check for uninitialized buffer (diff) | |
download | linux-4907602f85d454c127d20ac943ead13e2919898d.tar.xz linux-4907602f85d454c127d20ac943ead13e2919898d.zip |
[media] media: vb2: set buffer length correctly for all buffer types
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>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/videobuf2-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf2-core.c b/drivers/media/video/videobuf2-core.c index 9bb92145ad5a..e7c52ff3c761 100644 --- a/drivers/media/video/videobuf2-core.c +++ b/drivers/media/video/videobuf2-core.c @@ -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", |