[PATCH 0/2] media: qcom: iris: Fix IRQ synchronization during power-off
From: Vishnu Reddy
Date: Wed Oct 07 2026 - 08:13:22 EST
Commit b9c2215bdedc9c ("media: qcom: iris: use disable_irq() during
power-off") changed the VPU power-off sequence to use disable_irq()
instead of disable_irq_nosync(). This was intended to wait for any
queued threaded IRQ handler to finish before gating VPU power.
However, iris_vpu_power_off() is called with core->lock held, and the
threaded IRQ handler (iris_hfi_isr_handler()) takes this same lock as
its first action. If the handler is queued when power-off begins,
disable_irq() blocks waiting for the handler, while the handler blocks
waiting for core->lock. This results in a deadlock.
This series reverts the commit that introduced the deadlock and
reintroduces the hardware protection safely.
The fix drops core->lock before calling disable_irq(), allowing the
pending ISR to acquire the lock and run to completion. To prevent race
conditions from concurrent power-off callers during this unlocked
window, an irq_disabling flag and a waitqueue are introduced to
serialize operations. Finally, disable_irq() is called before the
hardware is powered down, ensuring a safe hardware state.
Signed-off-by: Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>
---
Vishnu Reddy (2):
Revert "media: qcom: iris: use disable_irq() during power-off"
media: qcom: iris: Wait for threaded IRQ completion during power-off
drivers/media/platform/qcom/iris/iris_core.c | 10 +++++-----
drivers/media/platform/qcom/iris/iris_core.h | 5 +++++
drivers/media/platform/qcom/iris/iris_probe.c | 9 +++++----
drivers/media/platform/qcom/iris/iris_resources.c | 16 ++++++++++++++++
drivers/media/platform/qcom/iris/iris_resources.h | 2 ++
drivers/media/platform/qcom/iris/iris_vpu_common.c | 16 +++++++++++++---
6 files changed, 46 insertions(+), 12 deletions(-)
---
base-commit: eea3fef32a9cf36abcb5975a5a594e4135a6b026
change-id: 20261004-fix-disable-irq-safely-15b2f712800b
Best regards,
--
Vishnu Reddy <busanna.reddy@xxxxxxxxxxxxxxxx>