Merge tag 'drm-misc-next-2017-11-30' of git://anongit.freedesktop.org/drm/drm-misc...
[linux-block.git] / drivers / gpu / drm / i915 / intel_dp.c
index d112810041098171398dc81f016b3fdd20f2707f..65260fb35d2a78def00f92d8d57bebafbc3a60c6 100644 (file)
@@ -3735,9 +3735,16 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 
        }
 
-       /* Read the eDP Display control capabilities registers */
-       if ((intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] & DP_DPCD_DISPLAY_CONTROL_CAPABLE) &&
-           drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
+       /*
+        * Read the eDP display control registers.
+        *
+        * Do this independent of DP_DPCD_DISPLAY_CONTROL_CAPABLE bit in
+        * DP_EDP_CONFIGURATION_CAP, because some buggy displays do not have it
+        * set, but require eDP 1.4+ detection (e.g. for supported link rates
+        * method). The display control registers should read zero if they're
+        * not supported anyway.
+        */
+       if (drm_dp_dpcd_read(&intel_dp->aux, DP_EDP_DPCD_REV,
                             intel_dp->edp_dpcd, sizeof(intel_dp->edp_dpcd)) ==
                             sizeof(intel_dp->edp_dpcd))
                DRM_DEBUG_KMS("EDP DPCD : %*ph\n", (int) sizeof(intel_dp->edp_dpcd),