[PATCH 0/7] drm/msm/dp: fix DisplayPort hotplug, link training, and multi-lane PHY setup
From: Gianfranco Mariotti
Date: Sat Nov 21 2026 - 16:41:24 EST
On platforms with a native DisplayPort connector using direct HPD
interrupts, DisplayPort initializes on cold boot, but physical cable
unplug and re-plug cycles leave the display blank even though link
training and stream enable callbacks report success.
This series fixes the underlying PHY lane setup, DPCD link-rate caching,
SST training-pattern handover, link maintenance BPC restoration, and
HPD / runtime-PM state tracking issues:
1. Configure PHY voltage swing and pre-emphasis across all active lanes
in msm_dp_ctrl_set_vx_px() instead of only lane 0.
2. Reset cached link_info->rate and link_info->use_rate_set in
msm_dp_panel_read_dpcd() so re-plugging a different sink does not
skip drm_dp_max_link_rate().
3. Avoid redundant back-to-back link training in
msm_dp_display_prepare_link() and keep DP_TRAINING_PATTERN_SET active
until msm_dp_ctrl_on_stream() is ready to switch REG_DP_STATE_CTRL to
DP_STATE_CTRL_SEND_VIDEO.
4. Reinitialize ctrl->video_comp and restore source BPC/format
parameters in msm_dp_ctrl_link_maintenance().
5. Dispatch DP_DP_IRQ_HPD_INT_MASK to msm_dp_irq_hpd_handle() instead of
misrouting expired 0.5-1.0 ms short pulses to msm_dp_hpd_plug_handle()
(kept separate as it can be dropped once Dmitry Baryshkov's and
Yongxing Mou's in-flight DRM_CONNECTOR_DP_IRQ_HPD series land).
6. Use asynchronous pm_runtime_put() on HPD unplug/notify paths called
from msm_dp_display_irq_thread() to avoid a synchronous disable_irq()
self-deadlock in msm_dp_pm_runtime_suspend().
7. Keep dp->plugged, dp->link->sink_count, AUX transfer enablement, and
PHY teardown consistent across plug, detect, unplug, and unprepare.
Testing:
Hardware-tested across cold boot, unplug/re-plug, monitor swap, and
IRQ_HPD link-retrain cycles on a QCS8275 (Monaco) SMARC board (SECO F86)
with a native DisplayPort connector running v6.18 + the FROMLIST DP
HPD/MST series (Qualcomm Linux / QLI 2.0), then forward-ported and
build-tested against msm-next.
Signed-off-by: Gianfranco Mariotti <gianfranco.mariotti94@xxxxxxxxx>
Gianfranco Mariotti (7):
drm/msm/dp: configure voltage swing and pre-emphasis for all active
lanes
drm/msm/dp: reset cached link rate before reading DPCD capabilities
drm/msm/dp: keep training pattern active until stream video is ready
drm/msm/dp: restore source params and reinit video_comp on link
maintenance
drm/msm/dp: dispatch native IRQ_HPD directly to
msm_dp_irq_hpd_handle()
drm/msm/dp: avoid synchronous runtime PM put from HPD IRQ thread
drm/msm/dp: fix HPD plugged and sink_count state tracking across
hotplug
drivers/gpu/drm/msm/dp/dp_ctrl.c | 23 ++++++++----
drivers/gpu/drm/msm/dp/dp_display.c | 55 ++++++++++++++++-------------
drivers/gpu/drm/msm/dp/dp_panel.c | 2 ++
3 files changed, 48 insertions(+), 32 deletions(-)
base-commit: d024361c631b3f020a26c07d683e5103404b0fbf
--
2.25.1