diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2014-12-15 17:27:44 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-12-15 22:10:19 +0200 |
commit | dea6686773eff15f7688da6c13ec48905afb3871 (patch) | |
tree | 4859a98d5efc01fcab3a2527342adafc45da2419 /yavta.c | |
parent | e35b175b58476c33efb80f6cdb4bd58c249c0e91 (diff) |
yavta: Set plane size for mplane buffers in qbuf
The plane size was left zero for mplane buffers when queueing a buffer. Fix
this.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
[For consistency set buf.length for USERPTR buffers only]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'yavta.c')
-rw-r--r-- | yavta.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -973,16 +973,19 @@ static int video_queue_buffer(struct device *dev, int index, enum buffer_fill_mo if (video_is_mplane(dev)) { buf.m.planes = planes; buf.length = dev->num_planes; - } else { - buf.length = dev->buffers[index].size[0]; } if (dev->memtype == V4L2_MEMORY_USERPTR) { if (video_is_mplane(dev)) { - for (i = 0; i < dev->num_planes; i++) - buf.m.planes[i].m.userptr = (unsigned long)dev->buffers[index].mem[i]; + for (i = 0; i < dev->num_planes; i++) { + buf.m.planes[i].m.userptr = (unsigned long) + dev->buffers[index].mem[i]; + buf.m.planes[i].length = + dev->buffers[index].size[i]; + } } else { buf.m.userptr = (unsigned long)dev->buffers[index].mem[0]; + buf.length = dev->buffers[index].size[0]; } } |