Skip to content

Recover DP output after a cable replug

Yashas D dri-devel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/bridge: ti-sn65dsi86: improve HPD interrupt handlingdrivers/gpu/drm/bridge/ti-sn65dsi86.c+25 -91 reply
2/2drm/bridge: ti-sn65dsi86: retrain DP link directly on cable replugdrivers/gpu/drm/bridge/ti-sn65dsi86.c+179 -362 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Recover DP output after a cable replug

Applications that don't run a hotplug event loop (e.g. kmstest, or any client that just holds a CRTC open without listening for uevents) never see a display come back after a DP cable is unplugged and replugged. The bridge's own link state goes down on removal, but nothing tells it to retrain when the cable comes back unless something above it issues a fresh atomic commit -- which these applications never do.

Patch 1 (improve HPD interrupt handling) fixes the interrupt handler to clear all three IRQ status registers instead of just one, so the IRQ pin is fully de-asserted and doesn't stay stuck; adds detection of the bridge's separate replug event (a short unplug/replug that doesn't always cross the debounce threshold used for insertion/removal); and switches from polling every connector on the device to notifying only the DP connector that actually had the event.

Patch 2 (retrain DP link directly on cable replug) adds a work handler that retrains the DP link and re-enables the video stream directly from the HPD interrupt path when the pipeline is still active, without waiting for a new atomic commit. This is the piece that actually fixes the recovery problem described above -- applications with no hotplug handling get their display back without doing anything.

Yashas D (2):
drm/bridge: ti-sn65dsi86: improve HPD interrupt handling drm/bridge: ti-sn65dsi86: retrain DP link directly on cable replug

 drivers/gpu/drm/bridge/ti-sn65dsi86.c | 227 ++++++++++++++++++++++----
 1 file changed, 193 insertions(+), 34 deletions(-)
Signature · 1 line
2.34.1