summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorStanimir Varbanov <stanimir.varbanov@linaro.org>2017-10-10 09:52:36 +0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2017-10-27 13:59:25 +0200
commit5232c37ce244db04fd50d160b92e40d2df46a2e9 (patch)
treeb19b3832f792941c509c7a747b56373534bc0595 /drivers/media/platform
parentf103ea11cd037943b511fa71c852ff14cc6de8ee (diff)
downloadtalos-obmc-linux-5232c37ce244db04fd50d160b92e40d2df46a2e9.tar.gz
talos-obmc-linux-5232c37ce244db04fd50d160b92e40d2df46a2e9.zip
media: venus: venc: fix bytesused v4l2_plane field
This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: <stable@vger.kernel.org> # for v4.13 and up Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/qcom/venus/venc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 6f123a387cf9..3fcf0e9b7b29 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -963,13 +963,12 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type,
if (!vbuf)
return;
- vb = &vbuf->vb2_buf;
- vb->planes[0].bytesused = bytesused;
- vb->planes[0].data_offset = data_offset;
-
vbuf->flags = flags;
if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {
+ vb = &vbuf->vb2_buf;
+ vb2_set_plane_payload(vb, 0, bytesused + data_offset);
+ vb->planes[0].data_offset = data_offset;
vb->timestamp = timestamp_us * NSEC_PER_USEC;
vbuf->sequence = inst->sequence_cap++;
} else {
OpenPOWER on IntegriCloud