From: Bryan O'Donoghue <bod@kernel.org>
To: Hungyu Lin <dennylin0707@gmail.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Cc: Abhinav Kumar <abhinav.kumar@linux.dev>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] media: qcom: iris: guard IRQ handler with runtime PM check
Date: Thu, 4 Jun 2026 09:44:02 +0100 [thread overview]
Message-ID: <76b46788-0cf1-469b-93be-b7788be2bd71@kernel.org> (raw)
In-Reply-To: <20260604082510.45733-1-dennylin0707@gmail.com>
On 04/06/2026 09:25, Hungyu Lin wrote:
> Use pm_runtime_get_if_active() before accessing hardware
> registers in the threaded IRQ handler. Skip interrupt processing
> when the device is not active.
>
> Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
> ---
> 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
>
> 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
>
> drivers/media/platform/qcom/iris/iris_hfi_common.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/media/platform/qcom/iris/iris_hfi_common.c b/drivers/media/platform/qcom/iris/iris_hfi_common.c
> index 621c66593d88..59040cce8cf1 100644
> --- a/drivers/media/platform/qcom/iris/iris_hfi_common.c
> +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c
> @@ -100,10 +100,15 @@ irqreturn_t iris_hfi_isr(int irq, void *data)
> irqreturn_t iris_hfi_isr_handler(int irq, void *data)
> {
> struct iris_core *core = data;
> + int ret;
>
> if (!core)
> return IRQ_NONE;
>
> + ret = pm_runtime_get_if_active(core->dev);
> + if (ret <= 0)
> + return IRQ_NONE;
> +
> mutex_lock(&core->lock);
> pm_runtime_mark_last_busy(core->dev);
> iris_vpu_clear_interrupt(core);
> @@ -111,6 +116,8 @@ irqreturn_t iris_hfi_isr_handler(int irq, void *data)
>
> core->hfi_response_ops->hfi_response_handler(core);
>
> + pm_runtime_put_autosuspend(core->dev);
> +
> if (!iris_vpu_watchdog(core, core->intr_status))
> enable_irq(irq);
>
> --
> 2.34.1
>
Could you please put your series of individual patches but group them
into a consistent list - so that I/we don't have to figure our how to
apply them and in which order.
---
bod
next prev parent reply other threads:[~2026-06-04 8:44 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <v2-message-id>
2026-06-04 8:25 ` Hungyu Lin
2026-06-04 8:44 ` Bryan O'Donoghue [this message]
2026-06-04 9:07 ` Denny Lin
2026-06-04 11:12 ` Bryan O'Donoghue
2026-06-04 12:06 ` Denny Lin
2026-06-04 12:08 ` Bryan O'Donoghue
2026-06-04 13:25 ` Dmitry Baryshkov
2026-06-04 14:55 ` Denny Lin
2026-06-07 20:42 ` Dmitry Baryshkov
2026-06-07 20:40 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76b46788-0cf1-469b-93be-b7788be2bd71@kernel.org \
--to=bod@kernel.org \
--cc=abhinav.kumar@linux.dev \
--cc=dennylin0707@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=vikash.garodia@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome