Re: [PATCH v1 6/7] media: chips-media: wave5: Fix pipeline stall when queuing fails
From: Nicolas Dufresne
Date: Wed Jul 15 2026 - 22:15:14 EST
Le vendredi 26 juin 2026 à 10:22 +0900, Jackson.lee a écrit :
> From: Jackson Lee <jackson.lee@xxxxxxxxxxxxxxx>
>
> The Wave5 decoder calls v4l2_m2m_job_finish() immediately in device_run()
> after submitting frames to firmware. When the firmware completes those
> frames and the queue drains to zero, finish_decode() has no active M2M
> job to finish, so v4l2_m2m_schedule_next_job() is never called and the
> decoder stalls.
>
> Call v4l2_m2m_try_schedule() in finish_decode() when the firmware queue
> empties to ensure the framework always schedules the next device_run().
>
> Fixes: a176ac5e701f ("media: chips-media: wave5: Improve performance of decoder")
> Cc: stable@xxxxxxxxxxxxxxx
> 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 | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> 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 f33c00cb801b..1817b83c5884 100644
> --- a/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> +++ b/drivers/media/platform/chips-media/wave5/wave5-vpu-dec.c
> @@ -475,7 +475,10 @@ static void wave5_vpu_dec_finish_decode(struct vpu_instance *inst)
> v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
> }
>
> - inst->queuing_fail = false;
> + if (inst->queuing_fail) {
> + inst->queuing_fail = false;
> + v4l2_m2m_try_schedule(m2m_ctx);
> + }
> }
>
> static int wave5_vpu_dec_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
Attachment:
signature.asc
Description: This is a digitally signed message part