Re: [PATCH v2 4/9] media: chips-media: wave5: ack the interrupt after dispatching it
From: Nicolas Dufresne
Date: Thu Nov 26 2026 - 19:54:26 EST
Le lundi 09 novembre 2026 à 14:28 +0900, Jackson.lee a écrit :
> From: Jackson Lee <jackson.lee@xxxxxxxxxxxxxxx>
>
> W5_RET_QUEUE_CMD_DONE_INST is written by both the driver and the VPU:
> the VPU sets the bit of every instance whose command completed, and the
> driver clears the bits it has consumed. The driver does that as a
> read-modify-write over a snapshot taken at the top of the handler, so
> any bit the VPU adds in between is erased.
>
> The firmware does not update that register, for any reason, until the
> host acknowledges the interrupt through W5_VPU_VINT_REASON_CLR and
> W5_VPU_VINT_CLEAR, so leaving the interrupt unacknowledged for the whole
> dispatch is what keeps the register still. Acknowledging first opened
> the race instead: the firmware could rewrite the register, and the
> write-back then dropped the instance it had just added. That instance is
> never reported again -- its queue count stays non-zero and no further
> completion arrives, so it stops decoding for good while the others keep
> running.
>
> Move both acknowledge writes past the dispatch loop. The re-read of
> W5_VPU_VINT_REASON that tried to narrow the window is no longer needed.
>
> Fixes: 9707a6254a8a ("media: chips-media: wave5: Add the v4l2 layer")
> Cc: stable@xxxxxxxxxxxxxxx
> Tested-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>
Attachment:
signature.asc
Description: This is a digitally signed message part