Skip to contentSkip to conversation

drm/i915: Fake HDMI live status

PATCH Superseded Shashank Sharma 3 participants 3 messages Apr 21, 2016

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915: Fake HDMI live status

This patch does the following:
- Fakes live status of HDMI as connected (even if that's not). While testing certain (monitor + cable) combinations with various intel platforms, it seems that live status register doesn't work reliably on some older devices. So limit the live_status check for HDMI detection, only for platforms from gen7 onwards.

This fixes regression added by patch:
'commit 237ed86c693d ("drm/i915: Check live status before reading edid")'

V2: restrict faking live_status to certain platforms

Based on suggestion by: Ville Syrjala<[email protected]>

---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +10 -2
index b199ede..c2150db 100644
@@ -1412,8 +1412,16 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 				hdmi_to_dig_port(intel_hdmi));
 	}
 
-	if (!live_status)
-		DRM_DEBUG_KMS("Live status not up!");
+	/*
+	* Live status reg is not reliable for all older platforms
+	* So for certain platforms, dont block EDID read even if
+	* live_status is down, give EDID a shot.
+	*/
+	if ((INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
+		&& !live_status) {
+		DRM_DEBUG_KMS("Warning: live status not up, faking it\n");
+		live_status = true;
+	}
 
 	intel_hdmi_unset_edid(connector);
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 8 lines · Shashank Sharma

This patch does the following:
- Fakes live status of HDMI as connected (even if that's not). While testing certain (monitor + cable) combinations with various intel platforms, it seems that live status register doesn't work reliably on some older devices. So limit the live_status check for HDMI detection, only for platforms from gen7 onwards.

Quoted 7 lines

This fixes regression added by patch:
'commit 237ed86c693d ("drm/i915: Check live status before reading edid")'

V2: restrict faking live_status to certain platforms

Based on suggestion by: Ville Syrjala<[email protected]>

Did we have any bugs open for this? Those should be listed here.

Quoted 9 lines
---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +0 -0
index b199ede..c2150db 100644

drivers/gpu/drm/i915/intel_hdmi.c intel_hdmi_detect(struct drm_connector *connector, bool force) · line 1416

Quoted 5 lines
drivers/gpu/drm/i915/intel_hdmi.c +0 -2
@@ -1412,8 +1412,16 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 				hdmi_to_dig_port(intel_hdmi));
 	}
 
-	if (!live_status)
-		DRM_DEBUG_KMS("Live status not up!");

I think we should keep this debug for the other platforms.

drivers/gpu/drm/i915/intel_hdmi.c intel_hdmi_detect(struct drm_connector *connector, bool force) · line 1419

Quoted 5 lines
drivers/gpu/drm/i915/intel_hdmi.c +5 -0
+	/*
+	* Live status reg is not reliable for all older platforms
+	* So for certain platforms, dont block EDID read even if
+	* live_status is down, give EDID a shot.
+	*/

Comment is misindented.

drivers/gpu/drm/i915/intel_hdmi.c intel_hdmi_detect(struct drm_connector *connector, bool force) · line 1421

Quoted 2 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
+	if ((INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
+		&& !live_status) {

Indent fail here too.

drivers/gpu/drm/i915/intel_hdmi.c intel_hdmi_detect(struct drm_connector *connector, bool force) · line 1422

Quoted 1 line
drivers/gpu/drm/i915/intel_hdmi.c +1 -0
+		DRM_DEBUG_KMS("Warning: live status not up, faking it\n");

The "Warning: " prefix seems a bit pointless.

The rest looks good to me.

Quoted 7 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
+		live_status = true;
+	}
 
 	intel_hdmi_unset_edid(connector);
 
Signature · 1 line
1.9.1
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#2 lore raw
In reply to Shashank Sharma
Quoted 10 lines · Shashank Sharma

This patch does the following:
- Fakes live status of HDMI as connected (even if that's not). While testing certain (monitor + cable) combinations with various intel platforms, it seems that live status register doesn't work reliably on some older devices. So limit the live_status check for HDMI detection, only for platforms from gen7 onwards.

This fixes regression added by patch:
'commit 237ed86c693d ("drm/i915: Check live status before reading edid")'

Fixes 237ed86c693d ("drm/i915: Check live status before reading edid")
Quoted 31 lines

V2: restrict faking live_status to certain platforms

Based on suggestion by: Ville Syrjala<[email protected]>

---
 drivers/gpu/drm/i915/intel_hdmi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +10 -2
index b199ede..c2150db 100644
@@ -1412,8 +1412,16 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 				hdmi_to_dig_port(intel_hdmi));
 	}
 
-	if (!live_status)
-		DRM_DEBUG_KMS("Live status not up!");
+	/*
+	* Live status reg is not reliable for all older platforms
+	* So for certain platforms, dont block EDID read even if
+	* live_status is down, give EDID a shot.
+	*/
+	if ((INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
+		&& !live_status) {
+		DRM_DEBUG_KMS("Warning: live status not up, faking it\n");
+		live_status = true;
+	}
 
 	intel_hdmi_unset_edid(connector);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx