Skip to contentSkip to conversation

3.6-rc1 breaks my laptop graphics (intel)

PATCH Greg KH 2 participants 5 messages Aug 12, 2012

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

Hi Daniel.

The 3.6-rc1 kernel breaks my laptop, booting to a black screen when the i915 driver initializes itself. I bisected this down to commit 24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe), and when I revert that, and also a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on the first patch, my laptop works just fine.

Below is the combined revert.

Any thoughts? Any patch I can try out?

thanks,

greg k-h

------
Subject: drm/i915: revert 24ded204429fa0f5501d37c63ee35c555c0b75ee and a4f32fc3a37e982fffce8ec583643990ff288419

24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe) breaks the boot for my laptop, so revert it, and a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on it.

drivers/gpu/drm/i915/intel_drv.h +1 -2
index 8435355..4e786f2 100644
@@ -383,8 +383,7 @@ extern u32 intel_panel_get_max_backlight(struct drm_device *dev);
 extern u32 intel_panel_get_backlight(struct drm_device *dev);
 extern void intel_panel_set_backlight(struct drm_device *dev, u32 level);
 extern int intel_panel_setup_backlight(struct drm_device *dev);
-extern void intel_panel_enable_backlight(struct drm_device *dev,
-					 enum pipe pipe);
+extern void intel_panel_enable_backlight(struct drm_device *dev);
 extern void intel_panel_disable_backlight(struct drm_device *dev);
 extern void intel_panel_destroy_backlight(struct drm_device *dev);
 extern enum drm_connector_status intel_panel_detect(struct drm_device *dev);
drivers/gpu/drm/i915/intel_lvds.c +26 -6
index e05c0d3..6547904 100644
@@ -71,7 +71,6 @@ static struct intel_lvds *intel_attached_lvds(struct drm_connector *connector)
 static void intel_lvds_enable(struct intel_lvds *intel_lvds)
 {
 	struct drm_device *dev = intel_lvds->base.base.dev;
-	struct intel_crtc *intel_crtc = to_intel_crtc(intel_lvds->base.base.crtc);
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	u32 ctl_reg, lvds_reg, stat_reg;
 
@@ -108,7 +107,7 @@ static void intel_lvds_enable(struct intel_lvds *intel_lvds)
 	if (wait_for((I915_READ(stat_reg) & PP_ON) != 0, 1000))
 		DRM_ERROR("timed out waiting for panel to power on\n");
 
-	intel_panel_enable_backlight(dev, intel_crtc->pipe);
+	intel_panel_enable_backlight(dev);
 }
 
 static void intel_lvds_disable(struct intel_lvds *intel_lvds)
@@ -1079,14 +1078,35 @@ bool intel_lvds_init(struct drm_device *dev)
 		goto failed;
 
 out:
-	/*
-	 * Unlock registers and just
-	 * leave them unlocked
-	 */
 	if (HAS_PCH_SPLIT(dev)) {
+		u32 pwm;
+
+		pipe = (I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT) ? 1 : 0;
+
+		/* make sure PWM is enabled and locked to the LVDS pipe */
+		pwm = I915_READ(BLC_PWM_CPU_CTL2);
+		if (pipe == 0 && (pwm & BLM_PIPE_B))
+			I915_WRITE(BLC_PWM_CPU_CTL2, pwm & ~BLM_PWM_ENABLE);
+		if (pipe)
+			pwm |= BLM_PIPE_B;
+		else
+			pwm &= ~BLM_PIPE_B;
+		I915_WRITE(BLC_PWM_CPU_CTL2, pwm | BLM_PWM_ENABLE);
+
+		pwm = I915_READ(BLC_PWM_PCH_CTL1);
+		pwm |= BLM_PCH_PWM_ENABLE;
+		I915_WRITE(BLC_PWM_PCH_CTL1, pwm);
+		/*
+		 * Unlock registers and just
+		 * leave them unlocked
+		 */
 		I915_WRITE(PCH_PP_CONTROL,
 			   I915_READ(PCH_PP_CONTROL) | PANEL_UNLOCK_REGS);
 	} else {
+		/*
+		 * Unlock registers and just
+		 * leave them unlocked
+		 */
 		I915_WRITE(PP_CONTROL,
 			   I915_READ(PP_CONTROL) | PANEL_UNLOCK_REGS);
 	}
drivers/gpu/drm/i915/intel_panel.c +1 -50

65 lines not on this page · raw message

#1 lore raw
Quoted 10 lines · Greg KH

Hi Daniel.

The 3.6-rc1 kernel breaks my laptop, booting to a black screen when the i915 driver initializes itself. I bisected this down to commit 24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe), and when I revert that, and also a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on the first patch, my laptop works just fine.

Quoted 3 lines

Below is the combined revert.

Any thoughts? Any patch I can try out?

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-fixes&id=770c12312ad617172b1a65b911d3e6564fc5aca8

which is already merged to drm-intel-fixes.

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48
author
#2 lore raw
Quoted 11 lines · Daniel Vetter
Quoted 10 lines · Greg KH

Hi Daniel.

The 3.6-rc1 kernel breaks my laptop, booting to a black screen when the i915 driver initializes itself. I bisected this down to commit 24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe), and when I revert that, and also a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on the first patch, my laptop works just fine.

Quoted 7 lines
Quoted 3 lines

Below is the combined revert.

Any thoughts? Any patch I can try out?

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-fixes&id=770c12312ad617172b1a65b911d3e6564fc5aca8

which is already merged to drm-intel-fixes.

Ah, thanks, I'll go try that out, the Subject: line didn't draw my attention to it being the same problem as mine :)

greg k-h

author
#3 lore raw
Quoted 14 lines · Greg KH
Quoted 13 lines · Daniel Vetter
Quoted 12 lines · Greg KH

Hi Daniel.

The 3.6-rc1 kernel breaks my laptop, booting to a black screen when the i915 driver initializes itself. I bisected this down to commit 24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe), and when I revert that, and also a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on the first patch, my laptop works just fine.

Below is the combined revert.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Any thoughts? Any patch I can try out?

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-fixes&id=770c12312ad617172b1a65b911d3e6564fc5aca8

which is already merged to drm-intel-fixes.

Ah, thanks, I'll go try that out, the Subject: line didn't draw my attention to it being the same problem as mine :)

Yes, that works, many thanks.

I'm guessing this is going to be going to Linus soon, right?

greg k-h

#4 lore raw
Quoted 19 lines · Greg KH
Quoted 18 lines · Greg KH
Quoted 17 lines · Daniel Vetter
Quoted 10 lines · Greg KH

Hi Daniel.

The 3.6-rc1 kernel breaks my laptop, booting to a black screen when the i915 driver initializes itself. I bisected this down to commit 24ded204429fa0f5501d37c63ee35c555c0b75ee (drm/i915: properly enable the blc controller on the right pipe), and when I revert that, and also a4f32fc3a37e982fffce8ec583643990ff288419 (drm/i915: don't forget the PCH backlight registers) which depended on the first patch, my laptop works just fine.

Quoted 3 lines

Below is the combined revert.

Any thoughts? Any patch I can try out?

http://cgit.freedesktop.org/~danvet/drm-intel/commit/?h=drm-intel-fixes&id=770c12312ad617172b1a65b911d3e6564fc5aca8

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

which is already merged to drm-intel-fixes.

Ah, thanks, I'll go try that out, the Subject: line didn't draw my attention to it being the same problem as mine :)

Yes, that works, many thanks.

I'm guessing this is going to be going to Linus soon, right?

Yeah, I'm stalling a bit for test results on an edp regression fixer that affects the new macbook air, but I'll send current -fixes to Dave in a few days.

Thanks for reporting this regression,
Daniel

Signature · 3 lines
Daniel Vetter
Mail: [email protected]
Mobile: +41 (0)79 365 57 48