Re: [PATCH v2 3/3] media: qcom: iris: Fix IRQ disable depth imbalance on watchdog interrupt

From: Bryan O'Donoghue

Date: Thu Nov 12 2026 - 22:12:04 EST


On 11/11/2026 09:05, Vishnu Reddy wrote:
iris_hfi_isr() disables the IRQ for every interrupt and the threaded
handler enables it again

This reads like a statement of a bug to me.

except for a watchdog interrupt, which is left
masked until the firmware is reset.

Which then gets worse.

iris_vpu_power_off() decides whether
to add its own disable from core->intr_status, but that is only updated
by the threaded handler. If a watchdog interrupt is still pending when
power-off checks it, power-off adds a disable and the handler then skips
its enable, leaving the depth one higher than the single enable_irq() in
iris_vpu_power_on() can undo. The IRQ then stays disabled after the
reset and the firmware can no longer be reached.

Why don't we just do the _simple_ thing and enable the watchdog @ power-on and disable it @ power-off ? Let's at least investigate that.

If its infeasible or too reductive consider: passing IRQF_ONESHOT to devm_request_threaded_irq() then the kernel will automagically mask the ISR for you and will re-enable once your threaded handler has run.

We can then remove the watchdog interrupt as an exceptional (no pun) case from the IRQ.

Either way this flag mechanism smacks of spaghetti code and needs a rethink.

---
bod