Skip to contentSkip to conversation

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

PATCH In review Jesse Barnes 2 participants 4 messages Oct 8, 2010 – Oct 12, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Since the PLL may still be on, and the training pattern may not be correct. Fixes suspend/resume on my PCH eDP test system.

drivers/gpu/drm/i915/intel_dp.c +6 -9
index 8e019c8..2449192 100644
@@ -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;
 }
#1 lore raw

Re: [PATCH] drm/i915/dp: down the DP link even if the reg indicates it is already down

Quoted 2 lines · Jesse Barnes

Since the PLL may still be on, and the training pattern may not be correct. Fixes suspend/resume on my PCH eDP test system.

I was hoping to harvest a tested-by for this patch since we've had a few people with the same machine and the same symptoms.

I've pushed it to drm-intel-staging (which currently houses the current merge of -next with -fixes as there was a merge conflict with nouveau locking changes which I need to double check).
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
#2 lore raw

Re: [PATCH] drm/i915/dp: down the DP link even if the reg indicates it is already down

Quoted 10 lines · On Tue, 12 Oct 2010 10:09:07 +0100 Chris Wilson <[email protected]>…
Quoted 2 lines · Jesse Barnes

Since the PLL may still be on, and the training pattern may not be correct. Fixes suspend/resume on my PCH eDP test system.

I was hoping to harvest a tested-by for this patch since we've had a few people with the same machine and the same symptoms.

I've pushed it to drm-intel-staging (which currently houses the current merge of -next with -fixes as there was a merge conflict with nouveau locking changes which I need to double check).

Since this one didn't work for all reporters of the suspend/resume issue I'm trying to come up with an alternative. So you can drop this one.

Thanks,

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#3 lore raw

Re: [PATCH] drm/i915/dp: down the DP link even if the reg indicates it is already down

Quoted 3 lines · Jesse Barnes

Since this one didn't work for all reporters of the suspend/resume issue I'm trying to come up with an alternative. So you can drop this one.

And it is gone.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre