[Intel-gfx] [PATCH] drm/i915: use backlight legacy combination mode also for i945gm

Jani Nikula jani.nikula at intel.com
Tue Feb 25 10:14:56 CET 2014


i945gm also seems to use and need the legacy combination mode bit in
BLC_PWM_CTL.

Reported-and-tested-by: Luis Ortega <luiorpe1 at gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75001
Signed-off-by: Jani Nikula <jani.nikula at intel.com>

---

My scarce gen3 specs do not say anything about bit 16 of
BLC_PWM_CTL. Bits 31:17 are similar to gen2, which does have bit 16
specified as legacy mode.

Per the bug, we clearly should interpret bit 16 as legacy mode also for
I945GM, but how about other gen3 hardware? Thoughts?

I'm inclined to go with this, and fix others if they are reported.
---
 drivers/gpu/drm/i915/intel_panel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 5bc3f6ea1014..b3df5b90f79f 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -689,7 +689,7 @@ static void i9xx_enable_backlight(struct intel_connector *connector)
 		freq /= 0xff;
 
 	ctl = freq << 17;
-	if (IS_GEN2(dev) && panel->backlight.combination_mode)
+	if (panel->backlight.combination_mode)
 		ctl |= BLM_LEGACY_MODE;
 	if (IS_PINEVIEW(dev) && panel->backlight.active_low_pwm)
 		ctl |= BLM_POLARITY_PNV;
@@ -970,7 +970,7 @@ static int i9xx_setup_backlight(struct intel_connector *connector)
 
 	ctl = I915_READ(BLC_PWM_CTL);
 
-	if (IS_GEN2(dev))
+	if (IS_GEN2(dev) || IS_I945GM(dev))
 		panel->backlight.combination_mode = ctl & BLM_LEGACY_MODE;
 
 	if (IS_PINEVIEW(dev))
-- 
1.7.9.5




More information about the Intel-gfx mailing list