[PATCH v3 05/12] media: verisilicon: Enable the Rockchip encoder interrupt again after a reset
From: Arun Iyengar via B4 Relay
Date: Fri Nov 13 2026 - 12:32:11 EST
From: Arun Iyengar <aiyengar1990@xxxxxxxxx>
The reset operations of the Rockchip VEPU1 and VEPU2 encoders disable
the encoder interrupt before stopping the encoder. Nothing enables it
again: the encoder run functions don't write the interrupt register,
only the interrupt handler does. Every later job on the encoder then
times out as well.
Clear the interrupt register at the end of the reset, as the interrupt
handler does after each frame.
Fixes: 775fec69008d ("media: add Rockchip VPU JPEG encoder driver")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>
---
drivers/media/platform/verisilicon/rockchip_vpu_hw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
index 02673be9878e..ce3dbea70a8d 100644
--- a/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
+++ b/drivers/media/platform/verisilicon/rockchip_vpu_hw.c
@@ -475,6 +475,8 @@ static void rockchip_vpu1_enc_reset(struct hantro_ctx *ctx)
vepu_write(vpu, H1_REG_INTERRUPT_DIS_BIT, H1_REG_INTERRUPT);
vepu_write(vpu, 0, H1_REG_ENC_CTRL);
vepu_write(vpu, 0, H1_REG_AXI_CTRL);
+ /* Only the interrupt handler writes this register: enable the interrupt again. */
+ vepu_write(vpu, 0, H1_REG_INTERRUPT);
}
static void rockchip_vpu2_dec_reset(struct hantro_ctx *ctx)
@@ -493,6 +495,8 @@ static void rockchip_vpu2_enc_reset(struct hantro_ctx *ctx)
vepu_write(vpu, VEPU_REG_INTERRUPT_DIS_BIT, VEPU_REG_INTERRUPT);
vepu_write(vpu, 0, VEPU_REG_ENCODE_START);
vepu_write(vpu, 0, VEPU_REG_AXI_CTRL);
+ /* Only the interrupt handler writes this register: enable the interrupt again. */
+ vepu_write(vpu, 0, VEPU_REG_INTERRUPT);
}
/*
--
2.55.0