[PATCH v6 1/2] media: verisilicon: Don't report VDPU2 decoder errors as success

From: Arun Iyengar via B4 Relay

Date: Sat Dec 05 2026 - 01:51:51 EST


From: Arun Iyengar <aiyengar1990@xxxxxxxxx>

The VDPU2 interrupt handler completes the job as done whenever the
decoder raised an interrupt. DEC_IRQ is set for every interrupt,
including timeouts, bus errors and stream errors, so failed decodes
are returned to userspace as valid frames.

Check the picture ready bit instead, as the G1 handler does.

Fixes: 879dee56a40c ("media: rockchip/vpu: Add MPEG2 decoding support to RK3399")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
---
drivers/media/platform/verisilicon/rockchip_vpu_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
index 614d54e3a8ef..5784140f729f 100644
--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
@@ -392,7 +392,7 @@ static irqreturn_t rockchip_vpu2_vdpu_irq(int irq, void *dev_id)
u32 status;

status = vdpu_read(vpu, VDPU_REG_INTERRUPT);
- state = (status & VDPU_REG_INTERRUPT_DEC_IRQ) ?
+ state = (status & VDPU_REG_INTERRUPT_DEC_RDY_INT) ?
VB2_BUF_STATE_DONE : VB2_BUF_STATE_ERROR;

vdpu_write(vpu, 0, VDPU_REG_INTERRUPT);

--
2.55.0