drm/i915: Fix hpd live status bits for g4x
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / i915 / intel_hdmi.c
index e6c035b0fc1ce2d2e674aec93cb50c0ad7b7db67..4b8ed9f2dabc7ae9e9f3bb8f3b14c775096638b7 100644 (file)
@@ -1388,8 +1388,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!");
+       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);