mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v6] media: qcom: iris: use disable_irq() during power-off
@ 2026-06-30 15:26 ` Hungyu Lin
  2026-06-30 22:03   ` Bryan O'Donoghue
  0 siblings, 1 reply; 2+ messages in thread
From: Hungyu Lin @ 2026-06-30 15:26 UTC (permalink / raw)
  To: linux-media
  Cc: vikash.garodia, abhinav.kumar, bod, mchehab, konrad.dybcio,
	dmitry.baryshkov, linux-arm-msm, linux-kernel, stable,
	Hungyu Lin

The IRQ is registered as a threaded IRQ.

Using disable_irq_nosync() in iris_vpu_power_off() does not wait
for an already queued threaded IRQ handler to complete before
returning.

As a result, a threaded IRQ handler may still run after the VPU has
been powered down and access hardware registers after power-off.

Replace disable_irq_nosync() with disable_irq() so the power-off path
waits for any in-flight threaded IRQ handler to complete before
returning.

Fixes: bb8a95aa038e ("media: iris: implement power management")
Cc: stable@vger.kernel.org
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
 drivers/media/platform/qcom/iris/iris_vpu_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
index 69e6126dc4d9..538659284c7b 100644
--- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
+++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
@@ -236,7 +236,7 @@ void iris_vpu_power_off(struct iris_core *core)
 	iris_unset_icc_bw(core);
 
 	if (!iris_vpu_watchdog(core, core->intr_status))
-		disable_irq_nosync(core->irq);
+		disable_irq(core->irq);
 }
 
 int iris_vpu_power_on_controller(struct iris_core *core)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v6] media: qcom: iris: use disable_irq() during power-off
  2026-06-30 15:26 ` [PATCH v6] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
@ 2026-06-30 22:03   ` Bryan O'Donoghue
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan O'Donoghue @ 2026-06-30 22:03 UTC (permalink / raw)
  To: Hungyu Lin, linux-media
  Cc: vikash.garodia, abhinav.kumar, mchehab, konrad.dybcio,
	dmitry.baryshkov, linux-arm-msm, linux-kernel, stable

On 30/06/2026 16:26, Hungyu Lin wrote:
> The IRQ is registered as a threaded IRQ.
> 
> Using disable_irq_nosync() in iris_vpu_power_off() does not wait
> for an already queued threaded IRQ handler to complete before
> returning.
> 
> As a result, a threaded IRQ handler may still run after the VPU has
> been powered down and access hardware registers after power-off.
> 
> Replace disable_irq_nosync() with disable_irq() so the power-off path
> waits for any in-flight threaded IRQ handler to complete before
> returning.
> 
> Fixes: bb8a95aa038e ("media: iris: implement power management")
> Cc: stable@vger.kernel.org
> Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
>   drivers/media/platform/qcom/iris/iris_vpu_common.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.c b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> index 69e6126dc4d9..538659284c7b 100644
> --- a/drivers/media/platform/qcom/iris/iris_vpu_common.c
> +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.c
> @@ -236,7 +236,7 @@ void iris_vpu_power_off(struct iris_core *core)
>   	iris_unset_icc_bw(core);
> 
>   	if (!iris_vpu_watchdog(core, core->intr_status))
> -		disable_irq_nosync(core->irq);
> +		disable_irq(core->irq);
>   }
> 
>   int iris_vpu_power_on_controller(struct iris_core *core)
> --
> 2.34.1
> 
> 

Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
bod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-06-30 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <sum692CaNq_kIywmtjVJ3z0iG8qBK0eOdmOPYUaivwH3v6h9GxZZqm2_7vgbCrCOAZs-K0K9PejQsRXj1za4VA==@protonmail.internalid>
2026-06-30 15:26 ` [PATCH v6] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
2026-06-30 22:03   ` Bryan O'Donoghue

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®