[PATCH v12 23/23] drm/bridge: synopsys: dw-dp: Retrain on hotplug with pre-enabled link
Sebastian Reichel
sebastian.reichel at collabora.com
Fri Nov 13 21:00:56 PST 2026
From: Yury Smirnov <yurymonzon at gmail.com>
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 at gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.com>
---
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
More information about the Linux-rockchip
mailing list