summaryrefslogtreecommitdiff
path: root/yavta.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2014-12-15 17:27:44 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-12-15 22:10:19 +0200
commitdea6686773eff15f7688da6c13ec48905afb3871 (patch)
tree4859a98d5efc01fcab3a2527342adafc45da2419 /yavta.c
parente35b175b58476c33efb80f6cdb4bd58c249c0e91 (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.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/yavta.c b/yavta.c
index 7f9e814..d0bd932 100644
--- a/yavta.c
+++ b/yavta.c
@@ -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];
}
}