devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Damon Ding" <damon.ding@rock-chips.com>
Cc: dri-devel@lists.freedesktop.org, robh@kernel.org,
	devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v1 2/7] drm/bridge: analogix_dp: Return bitmask from analogix_dp_get_irq_type()
Date: Thu, 30 Jul 2026 03:41:06 +0000	[thread overview]
Message-ID: <20260730034106.77B791F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730032744.381566-3-damon.ding@rock-chips.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unconditional DP register access in hardirq/thread handlers causes bus faults when using GPIO HPD with PM runtime suspended.
--

--- Patch [2]: [PATCH v1 2/7] drm/bridge: analogix_dp: Return bitmask from analogix_dp_get_irq_type() ---
commit 23b7b1cae6716042fa037a50c31f18ad40263d93
Author: Damon Ding <damon.ding@rock-chips.com>

drm/bridge: analogix_dp: Return bitmask from analogix_dp_get_irq_type()

This commit converts analogix_dp_get_irq_type() to return a bitmask of pending
interrupt flags instead of just the first matched flag. It also updates the
handlers to check for a non-zero return value instead of DP_IRQ_TYPE_UNKNOWN.

> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 1c98f92e001d8..ccb8a374b40b7 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -708,10 +708,10 @@ static irqreturn_t analogix_dp_hardirq(int irq, void *arg)
>  {
[ ... ]
>  	irq_type = analogix_dp_get_irq_type(dp);
> -	if (irq_type != DP_IRQ_TYPE_UNKNOWN) {
> +	if (irq_type) {
>  		analogix_dp_mute_hpd_interrupt(dp);

[Severity: High]
Could this unconditional call to analogix_dp_mute_hpd_interrupt() cause a
regression (bus fault) when using GPIO HPD while the device is PM runtime
suspended?

Since an earlier patch in this series moved enable_irq() to
analogix_dp_bind() without keeping the device PM resumed for GPIO HPD
configurations, a GPIO interrupt can fire while the DP controller is suspended.

If that happens, analogix_dp_mute_hpd_interrupt() will directly read/write
MMIO registers (like ANALOGIX_DP_COMMON_INT_MASK_4) on an unclocked or
powered-off hardware block.

>  		ret = IRQ_WAKE_THREAD;
>  	}
[ ... ]
> @@ -722,7 +722,7 @@ static irqreturn_t analogix_dp_hardirq(int irq, void *arg)
>  static irqreturn_t analogix_dp_irq_thread(int irq, void *arg)
>  {
[ ... ]
> -	if (irq_type != DP_IRQ_TYPE_UNKNOWN) {
> +	if (irq_type) {
>  		analogix_dp_clear_hotplug_interrupts(dp);
>  		analogix_dp_unmute_hpd_interrupt(dp);

[Severity: High]
Similarly, could these function calls cause a regression for the same reason
if called during a GPIO HPD event while PM runtime suspended?

>  	}

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730032744.381566-1-damon.ding@rock-chips.com?part=2

  reply	other threads:[~2026-07-30  3:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30  3:27 [PATCH v1 0/7] Add HPD support for Rockchip Analogix DP Damon Ding
2026-07-30  3:27 ` [PATCH v1 1/7] drm/bridge: analogix_dp: Manage pm runtime and IRQ for native HPD pin detection Damon Ding
2026-07-30  3:39   ` sashiko-bot
2026-07-30  3:27 ` [PATCH v1 2/7] drm/bridge: analogix_dp: Return bitmask from analogix_dp_get_irq_type() Damon Ding
2026-07-30  3:41   ` sashiko-bot [this message]
2026-07-30  3:27 ` [PATCH v1 3/7] drm/bridge: analogix_dp: Extend mute/unmute HPD interrupts to accept irq bitmask Damon Ding
2026-07-30  3:41   ` sashiko-bot
2026-07-30  3:27 ` [PATCH v1 4/7] drm/bridge: analogix_dp: Extend clear_hotplug_interrupts to accept IRQ bitmask Damon Ding
2026-07-30  3:38   ` sashiko-bot
2026-07-30  3:27 ` [PATCH v1 5/7] drm/bridge: analogix_dp: Simplify analogix_dp_config_interrupt() Damon Ding
2026-07-30  3:27 ` [PATCH v1 6/7] drm/bridge: analogix_dp: Use platform-specific HPD detection scheme Damon Ding
2026-07-30  3:41   ` sashiko-bot

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=20260730034106.77B791F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=damon.ding@rock-chips.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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;
as well as URLs for NNTP newsgroup(s).