mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/7] drm/msm/dp: fix DisplayPort hotplug, link training, and multi-lane PHY setup
@ 2026-11-21 21:40 Gianfranco Mariotti
  2026-11-21 21:40 ` [PATCH 1/7] drm/msm/dp: configure voltage swing and pre-emphasis for all active lanes Gianfranco Mariotti
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Gianfranco Mariotti @ 2026-11-21 21:40 UTC (permalink / raw)
  To: Rob Clark, Dmitry Baryshkov
  Cc: Abhinav Kumar, Jessica Zhang, Sean Paul, Marijn Suijten,
	Yongxing Mou, Konrad Dybcio, Dale Whinham, David Airlie,
	Simona Vetter, linux-arm-msm, dri-devel, freedreno, linux-kernel,
	Gianfranco Mariotti

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@gmail.com>

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


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

end of thread, other threads:[~2026-11-21 21:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 21:40 [PATCH 0/7] drm/msm/dp: fix DisplayPort hotplug, link training, and multi-lane PHY setup Gianfranco Mariotti
2026-11-21 21:40 ` [PATCH 1/7] drm/msm/dp: configure voltage swing and pre-emphasis for all active lanes Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 2/7] drm/msm/dp: reset cached link rate before reading DPCD capabilities Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 3/7] drm/msm/dp: keep training pattern active until stream video is ready Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 4/7] drm/msm/dp: restore source params and reinit video_comp on link maintenance Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 5/7] drm/msm/dp: dispatch native IRQ_HPD directly to msm_dp_irq_hpd_handle() Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 6/7] drm/msm/dp: avoid synchronous runtime PM put from HPD IRQ thread Gianfranco Mariotti
2026-11-21 21:41 ` [PATCH 7/7] drm/msm/dp: fix HPD plugged and sink_count state tracking across hotplug Gianfranco Mariotti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®