From: sashiko-bot@kernel.org
To: "Gianfranco Mariotti" <gianfranco.mariotti94@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 08/11] drm/msm/dp: keep PHY initialized while plugged across link unprepare
Date: Thu, 03 Dec 2026 00:17:41 +0000 [thread overview]
Message-ID: <sashiko-outbox-246821@kernel.org> (raw)
In-Reply-To: <20261202234640.9379-9-gianfranco.mariotti94@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] drm/msm/dp: eDP PHY left uninitialized in
msm_dp_display_unprepare()
--
commit 3ff8f4b66e30683c7b1e9468b834d7cecc0a20e4
Author: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
drm/msm/dp: keep PHY initialized while plugged across link unprepare
This commit adds dp->prepared to track link preparation and reinitializes
the PHY in msm_dp_display_unprepare() and msm_dp_pm_runtime_resume() when
dp->plugged is set.
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index d1925594da878..9e3d81ffbe03e 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
[ ... ]
> @@ -1570,19 +1592,25 @@ static void msm_dp_display_unprepare(struct msm_dp_display_private *dp)
> {
> struct msm_dp *msm_dp_display = &dp->msm_dp_display;
>
> - /* dongle is still connected but sinks are disconnected */
> - if (dp->link->sink_count == 0)
> - msm_dp_link_psm_config(dp->link, &dp->panel->link_info, true);
> + scoped_guard(mutex, &dp->plugged_lock) {
> + if (!dp->prepared)
> + return;
>
> - msm_dp_ctrl_off_link(dp->ctrl, dp->panel);
> + /* dongle is still connected but sinks are disconnected */
> + if (dp->link->sink_count == 0 && dp->plugged)
> + msm_dp_link_psm_config(dp->link, &dp->panel->link_info,
> + true);
>
> - if (dp->link->sink_count == 0)
> - /* re-init the PHY so that we can listen to Dongle disconnect */
> - msm_dp_ctrl_reinit_phy(dp->ctrl);
> - else
> + msm_dp_ctrl_off_link(dp->ctrl, dp->panel);
> +
> + /* Keep PHY initialized for AUX and IRQ_HPD while a sink remains plugged */
> msm_dp_display_host_phy_exit(dp);
> + if (dp->plugged)
> + msm_dp_display_host_phy_init(dp);
[Severity: High]
Does this leave the eDP PHY uninitialized while the controller is still
runtime-active?
For eDP, msm_dp_pm_runtime_resume() initializes the PHY whenever the
controller is runtime-resumed regardless of dp->plugged, and
msm_dp_aux_transfer() skips the aux->enable_xfers check on eDP. In
msm_dp_display_atomic_post_disable(), msm_dp_hpd_unplug_handle() runs
before msm_dp_display_unprepare() and sets dp->plugged = false (and if
msm_dp_display_prepare_link() failed before setting dp->prepared,
msm_dp_hpd_unplug_handle() also calls msm_dp_display_host_phy_exit(dp)
directly).
When msm_dp_display_unprepare() then exits the PHY, dp->plugged is false so
msm_dp_display_host_phy_init() is skipped. The subsequent
pm_runtime_put_sync(&msm_dp_display->pdev->dev) does not suspend the
controller because the child DP AUX endpoint device (panel->dev) remains
runtime-active until panel_bridge_atomic_post_disable() ->
drm_panel_unprepare() runs later in the bridge chain, and only triggers an
asynchronous idle on the parent when it finally suspends. Any eDP AUX
transfer (such as panel_edp_get_modes() or AUX backlight updates) while the
controller is still RPM_ACTIVE will skip msm_dp_pm_runtime_resume() and
time out with -ETIMEDOUT against the uninitialized PHY.
Should msm_dp_display_unprepare() (and the failure path in
msm_dp_display_prepare_link()) also reinitialize the PHY when
msm_dp_display->is_edp is true, and msm_dp_hpd_unplug_handle() skip
msm_dp_display_host_phy_exit() on eDP so that msm_dp_pm_runtime_suspend()
remains responsible for exiting the eDP PHY?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261202234640.9379-1-gianfranco.mariotti94@gmail.com?part=8
next prev parent reply other threads:[~2026-12-03 0:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 23:46 [PATCH v3 00/11] drm/msm/dp: fix DisplayPort hotplug, link training, PHY lifecycle, and external HPD Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 01/11] drm/msm/dp: configure voltage swing and pre-emphasis for all active lanes Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 02/11] drm/msm/dp: reset cached link_info before reading DPCD capabilities Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 03/11] drm/msm/dp: keep training pattern active until stream video is ready Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 04/11] drm/msm/dp: reinit video_comp and guard stream state on link maintenance Gianfranco Mariotti
2026-12-03 0:03 ` sashiko-bot
2026-12-02 23:46 ` [PATCH v3 05/11] drm/msm/dp: avoid synchronous runtime PM put from HPD IRQ thread Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 06/11] drm/msm/dp: track DP_SINK_COUNT capability and sync prev_sink_count Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 07/11] drm/msm/dp: fix HPD plugged, AUX gate, and runtime PM tracking Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 08/11] drm/msm/dp: keep PHY initialized while plugged across link unprepare Gianfranco Mariotti
2026-12-03 0:17 ` sashiko-bot [this message]
2026-12-02 23:46 ` [PATCH v3 09/11] drm/msm/dp: re-read EDID on demand in get_modes when blob is missing Gianfranco Mariotti
2026-12-02 23:46 ` [PATCH v3 10/11] drm/msm/dp: guard internal HPD state checks when external HPD is used Gianfranco Mariotti
2026-12-03 0:04 ` sashiko-bot
2026-12-02 23:46 ` [PATCH v3 11/11] drm/msm/dp: dispatch native IRQ_HPD directly to msm_dp_irq_hpd_handle() Gianfranco Mariotti
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-246821@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gianfranco.mariotti94@gmail.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.