summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2013-06-21 06:55:27 (GMT)
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-07-26 15:13:01 (GMT)
commit366108f0ecfddc1957e02e9cc42db4c2e1053e24 (patch)
tree20cc3e31449299cdcdae7e5e6e4eaddfd0e83415
parente2c257f4588e3e2de1d3a9f203644ff6619ad886 (diff)
downloadlinux-fsl-qoriq-366108f0ecfddc1957e02e9cc42db4c2e1053e24.tar.xz
[media] coda: use vb2_set_plane_payload instead of setting v4l2_planes[0].bytesused directly
As stated in the vb2_buffer documentation, drivers should not directly fill in v4l2_planes[0].bytesused, but should use the vb2_set_plane_payload() function instead. No functional changes. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/platform/coda.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index df4ada88..ef3bb8b 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1671,12 +1671,12 @@ static irqreturn_t coda_irq_handler(int irq, void *data)
wr_ptr = coda_read(dev, CODA_REG_BIT_WR_PTR(ctx->idx));
/* Calculate bytesused field */
if (dst_buf->v4l2_buf.sequence == 0) {
- dst_buf->v4l2_planes[0].bytesused = (wr_ptr - start_ptr) +
- ctx->vpu_header_size[0] +
- ctx->vpu_header_size[1] +
- ctx->vpu_header_size[2];
+ vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr +
+ ctx->vpu_header_size[0] +
+ ctx->vpu_header_size[1] +
+ ctx->vpu_header_size[2]);
} else {
- dst_buf->v4l2_planes[0].bytesused = (wr_ptr - start_ptr);
+ vb2_set_plane_payload(dst_buf, 0, wr_ptr - start_ptr);
}
v4l2_dbg(1, coda_debug, &ctx->dev->v4l2_dev, "frame size = %u\n",