[PATCH] media: rockchip: rga: use v4l2_m2m_buf_copy_metadata

Nicolas Dufresne nicolas at ndufresne.ca
Thu May 25 08:35:56 PDT 2023


Le mardi 23 mai 2023 à 11:03 +0200, Michael Tretter a écrit :
> The v4l2_m2m_buf_copy_metadata function correctly copies the metadata of
> the buffer. Use that function instead of open-coding the metadata copy.
> 
> Signed-off-by: Michael Tretter <m.tretter at pengutronix.de>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

> ---
>  drivers/media/platform/rockchip/rga/rga.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/media/platform/rockchip/rga/rga.c b/drivers/media/platform/rockchip/rga/rga.c
> index 67dcf22e5ba3..e4b8ce9ab3c6 100644
> --- a/drivers/media/platform/rockchip/rga/rga.c
> +++ b/drivers/media/platform/rockchip/rga/rga.c
> @@ -76,10 +76,7 @@ static irqreturn_t rga_isr(int irq, void *prv)
>  		WARN_ON(!src);
>  		WARN_ON(!dst);
>  
> -		dst->timecode = src->timecode;
> -		dst->vb2_buf.timestamp = src->vb2_buf.timestamp;
> -		dst->flags &= ~V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
> -		dst->flags |= src->flags & V4L2_BUF_FLAG_TSTAMP_SRC_MASK;
> +		v4l2_m2m_buf_copy_metadata(src, dst, true);
>  
>  		v4l2_m2m_buf_done(src, VB2_BUF_STATE_DONE);
>  		v4l2_m2m_buf_done(dst, VB2_BUF_STATE_DONE);




More information about the linux-arm-kernel mailing list