@@ -59,14 +59,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;
Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)