[PATCH 1/2] drm/i915: Skip live status if not supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rather than first attempting to use live status on platforms where
its functionality is spotty, and then forcing it to true no matter
what, we first check whether we're on a supported platform,
*then* try to detect whether there's anything connected or not.

This doesn't improve things for newer platforms, but for older
platforms we save ~80ms / HDMI-port with no display connected
whenever intel_hdmi_detect() is called.

Signed-off-by: David Weinehall <david.weinehall@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_hdmi.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 4df9f384910c..713c91ce7f70 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1475,6 +1475,14 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 
+	/*
+	 * Live status register is not reliable on all intel platforms.
+	 * So consider live_status only for certain platforms, for
+	 * others, read EDID to determine presence of sink.
+	 */
+	if (INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
+		live_status = true;
+
 	for (try = 0; !live_status && try < 9; try++) {
 		if (try)
 			msleep(10);
@@ -1482,16 +1490,8 @@ intel_hdmi_detect(struct drm_connector *connector, bool force)
 				hdmi_to_dig_port(intel_hdmi));
 	}
 
-	if (!live_status) {
+	if (!live_status)
 		DRM_DEBUG_KMS("HDMI live status down\n");
-		/*
-		 * Live status register is not reliable on all intel platforms.
-		 * So consider live_status only for certain platforms, for
-		 * others, read EDID to determine presence of sink.
-		 */
-		if (INTEL_INFO(dev_priv)->gen < 7 || IS_IVYBRIDGE(dev_priv))
-			live_status = true;
-	}
 
 	intel_hdmi_unset_edid(connector);
 
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux