Commit 949658cb authored by Shixiong Ou's avatar Shixiong Ou Committed by Alex Deucher
Browse files

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: default avatarShixiong Ou <oushixiong@kylinos.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d2d3a440
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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);