From 4c8c1e0790615062eb423c20bd9fd37279f3d5f0 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 16 Apr 2013 15:40:37 +0200 Subject: [PATCH] drm/i915: Don't clamp backlight when disabling on gen4+ Hopefully this solves the various "backlight is dead" issues on multi-gpu setups where the intel backlight controls have control over the lcd panel even when the intel gpu is _not_ in control of the lvds output. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55311 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59785 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=61115 Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_panel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index eb5e6e9..8e8bb40 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -299,7 +299,6 @@ void intel_panel_disable_backlight(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; dev_priv->backlight.enabled = false; - intel_panel_actually_set_backlight(dev, 0); if (INTEL_INFO(dev)->gen >= 4) { uint32_t reg, tmp; @@ -313,6 +312,10 @@ void intel_panel_disable_backlight(struct drm_device *dev) tmp &= ~BLM_PCH_PWM_ENABLE; I915_WRITE(BLC_PWM_PCH_CTL1, tmp); } + } else { + /* pre-gen4 doesn't have a separate enable bit so we need to + * smash the actual backlight pwm to 0 */ + intel_panel_actually_set_backlight(dev, 0); } } -- 1.7.10.4