[PATCH v12 23/23] drm/bridge: synopsys: dw-dp: Retrain on hotplug with pre-enabled link
From: Sebastian Reichel
Date: Sat Nov 14 2026 - 00:04:19 EST
From: Yury Smirnov <yurymonzon@xxxxxxxxx>
A long HPD pulse only sends a hotplug event. When the sink is replugged
while the output stays enabled with an unchanged mode, the compositor
might not do any modeset and the link is never trained again, so the
sink shows no signal.
On a long pulse with the link enabled and the sink present, retrain
the link if its status shows it lost.
Signed-off-by: Yury Smirnov <yurymonzon@xxxxxxxxx>
Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
drivers/gpu/drm/bridge/synopsys/dw-dp.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
index bf3a53463394..b245d6200913 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
@@ -2394,6 +2394,12 @@ static void dw_dp_hpd_work(struct work_struct *work)
dev_warn(dp->dev, "Retrain link failed\n");
}
} else {
+ if (dp->link.enabled && dw_dp_hpd_detect(dp)) {
+ ret = dw_dp_link_retrain(dp);
+ if (ret)
+ dev_warn(dp->dev, "Retrain link failed\n");
+ }
+
drm_helper_hpd_irq_event(dp->bridge.dev);
}
}
--
2.53.0