summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2019-04-25 03:12:23 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-28 12:08:45 -0400
commit365f3bfc5f4b4bd9a3fa2b2573b881794199e22a (patch)
tree979501d58859e2a83d20a5d8c79fa43262f9084b /drivers/staging
parentcf760c4b6020cd6e4015465e7b39d69286296cc2 (diff)
media: rockchip/vpu: Use v4l2_m2m_buf_copy_metadata
Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
index 8bbc905b26c8..fbdf709e1ff0 100644
--- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
+++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c
@@ -58,14 +58,7 @@ static void rockchip_vpu_job_finish(struct rockchip_vpu_dev *vpu,
src->sequence = ctx->sequence_out++;
dst->sequence = ctx->sequence_cap++;
- dst->field = src->field;
- if (src->flags & V4L2_BUF_FLAG_TIMECODE)
- dst->timecode = src->timecode;
- dst->vb2_buf.timestamp = src->vb2_buf.timestamp;
- dst->flags &= ~(V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
- V4L2_BUF_FLAG_TIMECODE);
- dst->flags |= src->flags & (V4L2_BUF_FLAG_TSTAMP_SRC_MASK |
- V4L2_BUF_FLAG_TIMECODE);
+ v4l2_m2m_buf_copy_metadata(src, dst, true);
avail_size = vb2_plane_size(&dst->vb2_buf, 0) -
ctx->vpu_dst_fmt->header_size;