All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Marek Szyprowski" <m.szyprowski@samsung.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/bridge: analogix_dp: Power down synchronously on bridge disable
Date: Thu, 19 Nov 2026 08:59:23 +0000	[thread overview]
Message-ID: <sashiko-outbox-222759@kernel.org> (raw)
In-Reply-To: <20261119084923.1156243-1-m.szyprowski@samsung.com>

Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/bridge: analogix_dp: unclocked MMIO access in
  analogix_dp_bridge_detect() [1]
--

commit fd813b0a1a5eac6ddf7400690200a86fc66c6e6d
Author: Marek Szyprowski <m.szyprowski@samsung.com>

drm/bridge: analogix_dp: Power down synchronously on bridge disable

This commit switches analogix_dp_set_bridge() and
analogix_dp_bridge_disable() from pm_runtime_put_sync() to
pm_runtime_put_sync_suspend() so the device runtime-suspends immediately
rather than waiting for the autosuspend timer.

> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 8bb4c48aa3b48..022acb962b7ca 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1021,7 +1021,7 @@ static int analogix_dp_set_bridge(struct analogix_dp_device *dp)
>  	return 0;
>  
>  out_dp_init:
> -	pm_runtime_put_sync(dp->dev);
> +	pm_runtime_put_sync_suspend(dp->dev);
>  
>  	return ret;
>  }
> @@ -1163,7 +1163,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge)
>  
>  	analogix_dp_set_analog_power_down(dp, POWER_ALL, 1);
>  
> -	pm_runtime_put_sync(dp->dev);
> +	pm_runtime_put_sync_suspend(dp->dev);
>  
>  	dp->fast_train_enable = false;
>  	dp->psr_supported = false;

[Severity: High]
This problem wasn't introduced by this patch, but can
analogix_dp_bridge_detect() access ANALOGIX_DP_SYS_CTL_3 while dp->dev is
runtime-suspended [1]?

drivers/gpu/drm/bridge/analogix/analogix_dp_core.c:analogix_dp_bridge_detect() {
	if (dp->plat_data->next_bridge)
		return connector_status_connected;

	if (!analogix_dp_detect_hpd(dp))
		status = connector_status_connected;
}

When dp->plat_data->next_bridge is NULL, analogix_dp_bridge_detect() calls
analogix_dp_detect_hpd() without holding a runtime PM reference on
dp->dev.  If dp->hpd_gpiod is NULL (or dp->force_hpd is set),
analogix_dp_get_plug_in_status() and analogix_dp_force_hpd() read and
write ANALOGIX_DP_SYS_CTL_3 while the DP controller clocks and power
domain are off during connector polling with the display disabled, which
can trigger an external abort or bus hang on Exynos and Rockchip SoCs.

[1] https://sashiko.dev/#/bug/linux-ea09d64b-12cd-4301-bd54-12c515b01bde

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119084923.1156243-1-m.szyprowski@samsung.com?part=1

  reply	other threads:[~2026-11-19  8:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20261119084929eucas1p26166723765c9707e2e2b81f8ded99da6@eucas1p2.samsung.com>
2026-11-19  8:49 ` [PATCH] drm/bridge: analogix_dp: Power down synchronously on bridge disable Marek Szyprowski
2026-11-19  8:59   ` sashiko-bot [this message]
2026-11-19 18:31   ` Brian Norris
2026-11-19 22:27     ` Marek Szyprowski
2026-11-19 22:40       ` Marek Szyprowski
2026-11-19 23:23       ` Brian Norris

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=sashiko-outbox-222759@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=m.szyprowski@samsung.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.