[PATCH 0/3] drm/msm/dp: fix dead link-training fallback on Type-C boards
From: Jean-Francois Bobier
Date: Mon Oct 05 2026 - 09:15:15 EST
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