All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Nikita Zhandarovich" <n.zhandarovich@fintech.ru>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 3/3] drm/bridge: analogix_dp: Propagate errors from runtime resume
Date: Wed, 25 Nov 2026 16:03:00 +0000	[thread overview]
Message-ID: <sashiko-outbox-233697@kernel.org> (raw)
In-Reply-To: <20261125153958.1349811-4-n.zhandarovich@fintech.ru>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/bridge: analogix_dp: power_on() error check breaks Exynos
  DP AUX
--

commit b5122fa2090e46cf82c87fc8f96ad53a322e3824
Author: Nikita Zhandarovich <n.zhandarovich@fintech.ru>

drm/bridge: analogix_dp: Propagate errors from runtime resume

This commit checks return values from plat_data->power_on(), phy_set_mode(),
and phy_power_on() in analogix_dp_resume(), unwinding platform power and
disabling dp->clock on error.

> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index 4d3d72476dd95..9228655893a0b 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1539,15 +1539,30 @@ int analogix_dp_resume(struct analogix_dp_device *dp)
>  		return ret;
>  	}
>  
> -	if (dp->plat_data->power_on)
> -		dp->plat_data->power_on(dp->plat_data);
> +	if (dp->plat_data->power_on) {
> +		ret = dp->plat_data->power_on(dp->plat_data);
> +		if (ret)
> +			goto err_disable_clk;
> +	}

[Severity: High]
Does aborting analogix_dp_resume() on a non-zero return from
dp->plat_data->power_on() break DP AUX access on Exynos DP before a CRTC is
attached?

On Exynos DP, dp->plat_data.power_on is exynos_dp_poweron(), which calls
exynos_dp_crtc_clock_enable():

drivers/gpu/drm/exynos/exynos_dp.c:exynos_dp_crtc_clock_enable() {
	...
	if (!encoder->crtc)
		return -EPERM;
	...
}

Because encoder->crtc is NULL until an atomic modeset binds a CRTC to the
encoder (and becomes NULL again when the display is disabled), runtime
resume triggered by analogix_dpaux_transfer() now fails with -EPERM,
skipping phy_power_on() and analogix_dp_init_dp() and breaking AUX bus
panel population at probe time as well as pre-modeset EDID reads.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125153958.1349811-1-n.zhandarovich@fintech.ru?part=3

  reply	other threads:[~2026-11-25 16:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 15:39 [PATCH v2 0/3] drm: analogix_dp: Handle runtime resume failures Nikita Zhandarovich
2026-11-25 15:39 ` Nikita Zhandarovich
2026-11-25 15:39 ` [PATCH v2 1/3] drm/bridge: analogix_dp: Check runtime resume before accessing hardware Nikita Zhandarovich
2026-11-25 15:39   ` Nikita Zhandarovich
2026-11-30 12:00   ` Damon Ding
2026-11-30 12:00     ` Damon Ding
2026-11-25 15:39 ` [PATCH v2 2/3] drm/rockchip: analogix_dp: Disable pclk if setting eDP mode fails Nikita Zhandarovich
2026-11-25 15:39   ` Nikita Zhandarovich
2026-11-30 12:01   ` Damon Ding
2026-11-30 12:01     ` Damon Ding
2026-11-25 15:39 ` [PATCH v2 3/3] drm/bridge: analogix_dp: Propagate errors from runtime resume Nikita Zhandarovich
2026-11-25 15:39   ` Nikita Zhandarovich
2026-11-25 16:03   ` sashiko-bot [this message]
2026-11-25 17:37     ` Жандарович Никита Игоревич
2026-11-30 12:28   ` Damon Ding
2026-11-30 12:28     ` Damon Ding

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-233697@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=n.zhandarovich@fintech.ru \
    --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.