diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2015-03-07 16:19:36 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-03 01:29:19 +0200 |
commit | 360565fcf72637258ebe6d3984c669bc9d86f7cd (patch) | |
tree | f38cc3891b921e55c18edabfcef04b82c3f9783f /drivers | |
parent | [media] vivid: the overlay API wasn't disabled completely for multiplanar (diff) | |
download | linux-360565fcf72637258ebe6d3984c669bc9d86f7cd.tar.xz linux-360565fcf72637258ebe6d3984c669bc9d86f7cd.zip |
[media] vivid: fix typo in plane size checks
The plane size check was hardcoded to plane 0 instead of using the plane
index.
This failed when using the NV61M format which has a larger plane size for
the second plane compared to the first plane.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/vivid/vivid-vid-cap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/vivid/vivid-vid-cap.c b/drivers/media/platform/vivid/vivid-vid-cap.c index 550945a432c9..49f79a0aa2f6 100644 --- a/drivers/media/platform/vivid/vivid-vid-cap.c +++ b/drivers/media/platform/vivid/vivid-vid-cap.c @@ -188,9 +188,9 @@ static int vid_cap_buf_prepare(struct vb2_buffer *vb) size = tpg_g_bytesperline(&dev->tpg, p) * dev->fmt_cap_rect.height + dev->fmt_cap->data_offset[p]; - if (vb2_plane_size(vb, 0) < size) { + if (vb2_plane_size(vb, p) < size) { dprintk(dev, 1, "%s data will not fit into plane %u (%lu < %lu)\n", - __func__, p, vb2_plane_size(vb, 0), size); + __func__, p, vb2_plane_size(vb, p), size); return -EINVAL; } |