[Intel-gfx] [PATCH 4/4] drm/i915: Retry for live status

Sonika Jindal sonika.jindal at intel.com
Tue Aug 25 05:01:33 PDT 2015


Some monitors take time in setting the live status.
So retry for few times if this is a connect HPD

Signed-off-by: Sonika Jindal <sonika.jindal at intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 59518b4..239d70d 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1415,6 +1415,7 @@ void intel_hdmi_probe(struct intel_encoder *intel_encoder)
 	struct intel_connector *intel_connector =
 				intel_hdmi->attached_connector;
 	bool live_status = false;
+	unsigned int retry = 3;
 
 	/*
 	 * Sometimes DDI ports are enumerated as DP as well as HDMI and
@@ -1425,6 +1426,20 @@ void intel_hdmi_probe(struct intel_encoder *intel_encoder)
 		return;
 
 	live_status = intel_hdmi_live_status(hdmi_to_dig_port(intel_hdmi));
+	if (!intel_connector->detect_edid && live_status == false) {
+		/*
+		 * Hotplug had occurred and old status was disconnected,
+		 * so it might be possible that live status is not set,
+		 * so retry for few times
+		 */
+		do {
+			mdelay(10);
+			live_status = intel_hdmi_live_status(hdmi_to_dig_port(intel_hdmi));
+			if (live_status)
+				break;
+		} while (retry--);
+	}
+
 	/*
 	 * We are here, means there is a hotplug or a force
 	 * detection. Clear the cached EDID and probe the
-- 
1.7.10.4



More information about the Intel-gfx mailing list