aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShixiong Ou <[email protected]>2024-05-09 16:57:58 +0800
committerAlex Deucher <[email protected]>2024-05-13 15:44:38 -0400
commit949658cb9b69ab9d22a42a662b2fdc7085689ed8 (patch)
tree00b271bda9f5c8db6f70273339a530f65d8d5bca
parentd2d3a44008fea01ec7d5a9d9ca527286be2e0257 (diff)
drm/radeon: Delay Connector detecting when HPD singals is unstable
In some causes, HPD signals will jitter when plugging in or unplugging HDMI. Rescheduling the hotplug work for a second when EDID may still be readable but HDP is disconnected, and fixes this issue. Signed-off-by: Shixiong Ou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index b84b58926106..cf0114ca59a4 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -1267,6 +1267,16 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
goto exit;
}
}
+
+ if (dret && radeon_connector->hpd.hpd != RADEON_HPD_NONE &&
+ !radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
+ connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) {
+ DRM_DEBUG_KMS("EDID is readable when HPD disconnected\n");
+ schedule_delayed_work(&rdev->hotplug_work, msecs_to_jiffies(1000));
+ ret = connector_status_disconnected;
+ goto exit;
+ }
+
if (dret) {
radeon_connector->detected_by_load = false;
radeon_connector_free_edid(connector);