Bug 32005

Summary: [arrandale] [eDP] blank screen after KMS, kernel 2.6.36
Product: xorg Reporter: Rene Peinthor <peinthor>
Component: Driver/intelAssignee: Jesse Barnes <jbarnes>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: critical    
Priority: medium CC: kenyon
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 32003    
Attachments:
Description Flags
patch against black screen problem against kernel 2.6.36 none

Description Rene Peinthor 2010-11-30 10:39:29 UTC
Created attachment 40677 [details]
patch against black screen problem against kernel 2.6.36

As a kernel upgrade 2.6.36.1 arrived for the arch linux repositories.
As soon as i915 enters KMS my laptop(HP proBook 5320m) screen stays black, not even backlight.

I bisect the problem to this commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7643a7fa16edf180d593f705f4fa5930c40e8d2d

and also created a patch against 2.6.36, which reverts this commit and works so far for me.
Comment 1 Jesse Barnes 2011-01-05 09:58:03 UTC
does drm-intel-fixes work for you?  If not, can you try this patch too?

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 1dc6040..c768e30 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1334,17 +1334,24 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
 	struct drm_device *dev = intel_dp->base.base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	bool channel_eq = false;
-	int tries;
+	int tries, cr_tries;
 	u32 reg;
 	uint32_t DP = intel_dp->DP;
 
 	/* channel equalization */
 	tries = 0;
+	cr_tries = 0;
 	channel_eq = false;
 	for (;;) {
 		/* Use intel_dp->train_set[0] to set the voltage and pre emphasis values */
 		uint32_t    signal_levels;
 
+		if (cr_tries > 5) {
+			DRM_ERROR("failed to train DP, aborting\n");
+			intel_dp_link_down(intel_dp);
+			break;
+		}
+
 		if (IS_GEN6(dev) && is_edp(intel_dp)) {
 			signal_levels = intel_gen6_edp_signal_levels(intel_dp->train_set[0]);
 			DP = (DP & ~EDP_LINK_TRAIN_VOL_EMP_MASK_SNB) | signal_levels;
@@ -1367,14 +1374,26 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
 		if (!intel_dp_get_link_status(intel_dp))
 			break;
 
+		/* Make sure clock is still ok */
+		if (!intel_clock_recovery_ok(intel_dp->link_status, intel_dp->lane_count)) {
+			intel_dp_start_link_train(intel_dp);
+			cr_tries++;
+			continue;
+		}
+
 		if (intel_channel_eq_ok(intel_dp)) {
 			channel_eq = true;
 			break;
 		}
 
-		/* Try 5 times */
-		if (tries > 5)
-			break;
+		/* Try 5 times, then try clock recovery if that fails */
+		if (tries > 5) {
+			intel_dp_link_down(intel_dp);
+			intel_dp_start_link_train(intel_dp);
+			tries = 0;
+			cr_tries++;
+			continue;
+		}
 
 		/* Compute new intel_dp->train_set as requested by target */
 		intel_get_adjust_train(intel_dp);
Comment 2 Rene Peinthor 2011-01-07 02:36:45 UTC
sorry I can't test it right now, my new SSD drive died and I have to wait until the replacement arrives(1 week).
Comment 3 Rene Peinthor 2011-01-15 06:16:05 UTC
ok tested intel-drm-fixes.
I get a picture as I also do in 2.6.37. but a lot of flicker as described in bug#32003.
Comment 4 Jesse Barnes 2011-01-17 10:42:47 UTC
Ok, thanks.  I'll check out the other bug, looks like this one is fixed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.