@@ -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);
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@linux.intel.com> --- drivers/gpu/drm/i915/intel_hdmi.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)