* [PATCH v5] media: qcom: iris: use disable_irq() during power-off
@ 2026-06-10 14:15 ` Hungyu Lin
2026-06-12 7:51 ` Dmitry Baryshkov
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Hungyu Lin @ 2026-06-10 14:15 UTC (permalink / raw)
To: vikash.garodia, dikshita.agarwal
Cc: abhinav.kumar, bod, mchehab, konrad.dybcio, linux-media,
linux-arm-msm, linux-kernel, 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.
Replace it with disable_irq() so the power-off path waits for any
in-flight threaded handler before returning.
Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
v5:
- Drop the runtime PM check in the threaded IRQ handler.
- Use disable_irq() instead of disable_irq_nosync() in the power-off path,
as suggested by Konrad Dybcio.
v4:
- Clarify the possible ordering between IRQ_WAKE_THREAD,
runtime PM suspend, and the threaded IRQ handler.
- Describe the race condition motivating the runtime PM check.
v3:
- Remove the early enable_irq() from the PM-inactive early-return path.
- IRQ re-enablement is already handled by iris_vpu_power_on() after power-on.
v2:
- Use pm_runtime_get_if_active() instead of pm_runtime_get_if_in_use().
- Handle negative runtime PM return values correctly.
- Return IRQ_NONE when interrupt processing is skipped.
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 related [flat|nested] 4+ messages in thread
* Re: [PATCH v5] media: qcom: iris: use disable_irq() during power-off
2026-06-10 14:15 ` [PATCH v5] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
@ 2026-06-12 7:51 ` Dmitry Baryshkov
2026-06-29 14:31 ` Konrad Dybcio
2026-06-30 12:40 ` Bryan O'Donoghue
2 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2026-06-12 7:51 UTC (permalink / raw)
To: Hungyu Lin
Cc: vikash.garodia, dikshita.agarwal, abhinav.kumar, bod, mchehab,
konrad.dybcio, linux-media, linux-arm-msm, linux-kernel
On Wed, Jun 10, 2026 at 02:15:11PM +0000, 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.
>
> Replace it with disable_irq() so the power-off path waits for any
> in-flight threaded handler before returning.
>
> Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> v5:
> - Drop the runtime PM check in the threaded IRQ handler.
> - Use disable_irq() instead of disable_irq_nosync() in the power-off path,
> as suggested by Konrad Dybcio.
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5] media: qcom: iris: use disable_irq() during power-off
2026-06-10 14:15 ` [PATCH v5] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
2026-06-12 7:51 ` Dmitry Baryshkov
@ 2026-06-29 14:31 ` Konrad Dybcio
2026-06-30 12:40 ` Bryan O'Donoghue
2 siblings, 0 replies; 4+ messages in thread
From: Konrad Dybcio @ 2026-06-29 14:31 UTC (permalink / raw)
To: Hungyu Lin, vikash.garodia, dikshita.agarwal
Cc: abhinav.kumar, bod, mchehab, linux-media, linux-arm-msm,
linux-kernel
On 6/10/26 4:15 PM, 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.
>
> Replace it with disable_irq() so the power-off path waits for any
> in-flight threaded handler before returning.
>
> Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v5] media: qcom: iris: use disable_irq() during power-off
2026-06-10 14:15 ` [PATCH v5] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
2026-06-12 7:51 ` Dmitry Baryshkov
2026-06-29 14:31 ` Konrad Dybcio
@ 2026-06-30 12:40 ` Bryan O'Donoghue
2 siblings, 0 replies; 4+ messages in thread
From: Bryan O'Donoghue @ 2026-06-30 12:40 UTC (permalink / raw)
To: Hungyu Lin, vikash.garodia, dikshita.agarwal
Cc: abhinav.kumar, mchehab, konrad.dybcio, linux-media, linux-arm-msm,
linux-kernel
On 10/06/2026 15:15, 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.
Which means what. Elaborate on the consequences of this statement.
> Replace it with disable_irq() so the power-off path waits for any
> in-flight threaded handler before returning.
> Suggested-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> v5:
> - Drop the runtime PM check in the threaded IRQ handler.
> - Use disable_irq() instead of disable_irq_nosync() in the power-off path,
> as suggested by Konrad Dybcio.
>
> v4:
> - Clarify the possible ordering between IRQ_WAKE_THREAD,
> runtime PM suspend, and the threaded IRQ handler.
> - Describe the race condition motivating the runtime PM check.
>
> v3:
> - Remove the early enable_irq() from the PM-inactive early-return path.
> - IRQ re-enablement is already handled by iris_vpu_power_on() after power-on.
>
> v2:
> - Use pm_runtime_get_if_active() instead of pm_runtime_get_if_in_use().
> - Handle negative runtime PM return values correctly.
> - Return IRQ_NONE when interrupt processing is skipped.
>
> 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
>
>
You've described a bug so you need
- Fixes
- Cc: stable
---
bod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-30 12:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <FMV9sqmXHlHk1raxOJt6oAJ_agj4VQ41KVu7POI8lC49BVloufRM4zNyqYWH9cU6N_WwahIykSQbHdOwhQF58Q==@protonmail.internalid>
2026-06-10 14:15 ` [PATCH v5] media: qcom: iris: use disable_irq() during power-off Hungyu Lin
2026-06-12 7:51 ` Dmitry Baryshkov
2026-06-29 14:31 ` Konrad Dybcio
2026-06-30 12:40 ` 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