diff mbox

drm/i915/dp: down the DP link even if the reg indicates it's already down

Message ID 20101008103555.23a54ee8@jbarnes-desktop (mailing list archive)
State New, archived
Headers show

Commit Message

Jesse Barnes Oct. 8, 2010, 5:35 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 8e019c8..2449192 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -925,8 +925,7 @@  static void intel_dp_prepare(struct drm_encoder *encoder)
 		else
 			ironlake_edp_pll_off(encoder);
 	}
-	if (dp_reg & DP_PORT_EN)
-		intel_dp_link_down(intel_dp);
+	intel_dp_link_down(intel_dp);
 }
 
 static void intel_dp_commit(struct drm_encoder *encoder)
@@ -956,22 +955,20 @@  intel_dp_dpms(struct drm_encoder *encoder, int mode)
 	if (mode != DRM_MODE_DPMS_ON) {
 		if (is_edp(intel_dp))
 			ironlake_edp_backlight_off(dev);
-		if (dp_reg & DP_PORT_EN) {
-			intel_dp_link_down(intel_dp);
-		}
+		intel_dp_link_down(intel_dp);
 		if (is_edp(intel_dp))
 			ironlake_edp_panel_off(dev);
 		if (is_edp(intel_dp) && !is_pch_edp(intel_dp))
 			ironlake_edp_pll_off(encoder);
 	} else {
+		if (is_edp(intel_dp))
+			ironlake_edp_panel_on(intel_dp);
 		if (!(dp_reg & DP_PORT_EN)) {
-			if (is_edp(intel_dp))
-				ironlake_edp_panel_on(intel_dp);
 			intel_dp_start_link_train(intel_dp);
 			intel_dp_complete_link_train(intel_dp);
-			if (is_edp(intel_dp))
-				ironlake_edp_backlight_on(dev);
 		}
+		if (is_edp(intel_dp))
+			ironlake_edp_backlight_on(dev);
 	}
 	intel_dp->dpms_mode = mode;
 }