Re: [PATCH v2 9/9] media: chips-media: wave5: Stop FrameBuf Reset During Seek
From: Nicolas Dufresne
Date: Thu Nov 26 2026 - 20:20:58 EST
Le lundi 09 novembre 2026 à 14:28 +0900, Jackson.lee a écrit :
> From: Brandon Brnich <b-brnich@xxxxxx>
>
> A seek drains the capture queue via stop_streaming without stopping the
> m2m_ctx. streamoff_capture checks needs_reallocation which will always
> be true after the first sequence initialization. This will trigger a
> DEC_RESET_FRAMEBUF_INFO which will go through and deallocate all of the
> frame and auxiliary buffers.
>
> Video output can have corruption if the firmware is still referencing the
> buffers that just got reset. Clear needs_reallocation in wave5_prepare_fb
> once the new buffers are registered.
>
> Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Brandon Brnich <b-brnich@xxxxxx>
> Signed-off-by: Jackson Lee <jackson.lee@xxxxxxxxxxxxxxx>
> Signed-off-by: Nas Chung <nas.chung@xxxxxxxxxxxxxxx>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
> ---
> drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> index 102c07979d08..57511acbb28b 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> @@ -1250,6 +1250,8 @@ static int wave5_prepare_fb(struct vpu_instance *inst)
> return ret;
> }
>
> + inst->needs_reallocation = false;
> +
> /*
> * Mark all frame buffers as out of display, to avoid using them before
> * the application have them queued.
Attachment:
signature.asc
Description: This is a digitally signed message part