aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a9a5051419df..70075d9900da 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1551,6 +1551,7 @@ static enum drm_connector_status
1551ironlake_dp_detect(struct intel_dp *intel_dp) 1551ironlake_dp_detect(struct intel_dp *intel_dp)
1552{ 1552{
1553 enum drm_connector_status status; 1553 enum drm_connector_status status;
1554 int ret, i;
1554 1555
1555 /* Can't disconnect eDP, but you can close the lid... */ 1556 /* Can't disconnect eDP, but you can close the lid... */
1556 if (is_edp(intel_dp)) { 1557 if (is_edp(intel_dp)) {
@@ -1561,12 +1562,16 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
1561 } 1562 }
1562 1563
1563 status = connector_status_disconnected; 1564 status = connector_status_disconnected;
1564 if (intel_dp_aux_native_read(intel_dp, 1565 for (i = 0; i < 3; i++) {
1565 0x000, intel_dp->dpcd, 1566 ret = intel_dp_aux_native_read(intel_dp,
1566 sizeof (intel_dp->dpcd)) 1567 0x000, intel_dp->dpcd,
1567 == sizeof(intel_dp->dpcd)) { 1568 sizeof (intel_dp->dpcd));
1568 if (intel_dp->dpcd[DP_DPCD_REV] != 0) 1569 if (ret == sizeof(intel_dp->dpcd) &&
1570 intel_dp->dpcd[DP_DPCD_REV] != 0) {
1569 status = connector_status_connected; 1571 status = connector_status_connected;
1572 break;
1573 }
1574 msleep(1);
1570 } 1575 }
1571 DRM_DEBUG_KMS("DPCD: %hx%hx%hx%hx\n", intel_dp->dpcd[0], 1576 DRM_DEBUG_KMS("DPCD: %hx%hx%hx%hx\n", intel_dp->dpcd[0],
1572 intel_dp->dpcd[1], intel_dp->dpcd[2], intel_dp->dpcd[3]); 1577 intel_dp->dpcd[1], intel_dp->dpcd[2], intel_dp->dpcd[3]);