All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] drm/msm/dp: fix dead link-training fallback on Type-C boards
@ 2026-10-05 13:14 Jean-Francois Bobier
  2026-10-05 13:14 ` [PATCH 1/3] drm/msm/dp: don't gate link-training fallback on the controller's HPD block Jean-Francois Bobier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jean-Francois Bobier @ 2026-10-05 13:14 UTC (permalink / raw)
  To: linux-arm-msm
  Cc: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
	Sean Paul, Marijn Suijten, Xilin Wu, Bjorn Andersson,
	Konrad Dybcio, Bartosz Golaszewski, Sumit Garg, Saim Shujah,
	Shawn Guo, Geert Uytterhoeven, Yongxing Mou, David Airlie,
	Simona Vetter, dri-devel, freedreno, linux-kernel,
	Jean-Francois Bobier

These three patches come out of bringing up external DisplayPort over
USB-C on a OnePlus 8T (SM8250, msm DP driver). They are not
device-specific: all three are bugs in code paths that run on every
Type-C DP board using this driver, which today includes the Snapdragon
X Elite (x1e80100) laptops as well as phones.

Patch 1 matters most. The link-training rate/lane fallback in
msm_dp_ctrl_setup_main_link() is dead code on every Type-C board, because
its liveness check reads the DP controller's own HPD register, which
never reflects a real signal when HPD arrives out of band through a
drm_dp_hpd_bridge -- which is how every Type-C port gets its HPD. It is
latent: fallback only runs when training fails at full rate, so a good
cable never exercises it. Found with a cable whose lanes 2 and 3 never
achieve clock recovery at any rate.

Patch 2 demotes the per-attempt log lines in that same fallback loop
(plus one unrelated AUX interrupt message) from error to debug level.
Without it, a monitor that settles on two lanes after three attempts
prints nine error lines on a completely healthy attach.

Patch 3 sizes modes in msm_dp_display_mode_valid() against the link's
trained rate/lane count instead of the sink's advertised maximum, so a
fallback doesn't leave the mode list advertising bandwidth the link no
longer carries. It is a partial fix -- making userspace re-probe after a
fallback needs the DRM link-status property, which is the existing
// TODO in msm_dp_bridge_atomic_enable() and is not done here. Happy to
pick that up too if review wants the complete fix before this lands.

All three were found and verified on hardware with a cable that
reliably forces the fallback path (lanes 2 and 3 never complete clock
recovery). DPCD captures and the full fallback sequence are available on
request.

Verified against msm-next as of 5e4a3f7b2 ("drm/msm/dp: add
stream-aware link register accessors"), individually and applied
together in sequence.

Jean-Francois Bobier (3):
  drm/msm/dp: don't gate link-training fallback on the controller's HPD
    block
  drm/msm/dp: don't log an expected link-training fallback as errors
  drm/msm/dp: validate modes against the trained link, not the sink's
    claim

 drivers/gpu/drm/msm/dp/dp_aux.c     |  9 ++++++-
 drivers/gpu/drm/msm/dp/dp_ctrl.c    | 39 +++++++++++++++++++----------
 drivers/gpu/drm/msm/dp/dp_display.c | 38 ++++++++++++++++++++++++++--
 3 files changed, 70 insertions(+), 16 deletions(-)

-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-06  7:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 13:14 [PATCH 0/3] drm/msm/dp: fix dead link-training fallback on Type-C boards Jean-Francois Bobier
2026-10-05 13:14 ` [PATCH 1/3] drm/msm/dp: don't gate link-training fallback on the controller's HPD block Jean-Francois Bobier
2026-10-05 13:14 ` [PATCH 2/3] drm/msm/dp: don't log an expected link-training fallback as errors Jean-Francois Bobier
2026-10-05 13:14 ` [PATCH 3/3] drm/msm/dp: validate modes against the trained link, not the sink's claim Jean-Francois Bobier
2026-10-05 15:29   ` sashiko-bot
2026-10-05 15:56   ` [PATCH v2 " Jean-Francois Bobier

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.