dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonhoe Kim <26rote@gmail.com>
To: sashiko-reviews@lists.linux.dev
Cc: dri-devel@lists.freedesktop.org, robin.clark@oss.qualcomm.com,
	lumag@kernel.org, linux-arm-msm@vger.kernel.org,
	freedreno@lists.freedesktop.org, sashiko-bot@kernel.org,
	Joonhoe Kim <26rote@gmail.com>
Subject: Re: [PATCH] drm/msm/dp: hold one runtime PM reference per plugged state
Date: Wed, 30 Sep 2026 02:50:19 +0900	[thread overview]
Message-ID: <20260929175019.3899-1-26rote@gmail.com> (raw)
In-Reply-To: <20260929132029.911491F000FF@smtp.kernel.org>

On Tue, 29 Sep 2026 13:20:29 +0000, sashiko-bot@kernel.org wrote:
> Then, on the next plug, msm_dp_display_host_phy_init() will silently skip
> PHY initialization because dp->phy_initialized was never reset to false:
[...]
> Can this sequence leave the hardware PHY uninitialized on replug, causing
> link training to fail and the display to remain broken until reboot?

I tried it on the device (Lenovo TB323FU, a DP monitor over USB-C) by
delaying the unplug handler by 5 s and forcing a detect in that window.

- A normal unplug already leaves the PHY initialized across the
  controller's runtime suspend: msm_dp_hpd_unplug_handle() only calls
  msm_dp_display_host_phy_exit() when sink_count == 0, which it was not
  here, and msm_dp_pm_runtime_suspend() does not touch the PHY for DP.
  With this patch the controller suspended after the unplug, and a
  replug 20 s later trained the link with phy_init=1 and brought the
  picture back. The controller's runtime suspend does not power the PHY
  down, so the flag still describes the PHY correctly.

- Tearing the PHY down in detect() when the sink is gone (the natural
  fix for the scenario in the review) made it worse: the next detect()
  initialized the PHY again and hit

    phy phy-88e8000.phy.3: phy_power_on was called before phy_init

  and the SoC reset shortly after.

So I would keep this patch as it is. detect() clearing plugged so that
the unplug handler returns early is older than this change and is not
affected by it.

Thanks,
Joonhoe

  reply	other threads:[~2026-09-30 12:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 13:06 [PATCH] drm/msm/dp: hold one runtime PM reference per plugged state Joonhoe Kim
2026-09-29 13:20 ` sashiko-bot
2026-09-29 17:50   ` Joonhoe Kim [this message]
2026-10-07  4:39 ` Val Packett

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=20260929175019.3899-1-26rote@gmail.com \
    --to=26rote@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=lumag@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sashiko-bot@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