aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2012-04-11 12:23:35 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-04-12 15:14:12 -0400
commitf82cfb6bcda164ef3a66b8c3fc549b1f9bdd09ad (patch)
treebb39ff02a2a1c8fde1ace1a1e2411c04e5807072 /drivers/gpu/drm/i915
parentb6834bd63ec407444098be233122a25bf4f17c75 (diff)
drm/i915: allow PCH PWM override on IVB
On IVB, there are two sets of panel backlight regs: one in the CPU and one in the PCH. The CPU ones aren't generally used, so on IVB make sure we allow the PCH regs to actually control the backlight. v2: remove unused pwm variable (Daniel) move to init_hw function so we override on resume too Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 58f4b02151f2..33aaad30c0bc 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9530,6 +9530,19 @@ static void i915_disable_vga(struct drm_device *dev)
9530 POSTING_READ(vga_reg); 9530 POSTING_READ(vga_reg);
9531} 9531}
9532 9532
9533static void ivb_pch_pwm_override(struct drm_device *dev)
9534{
9535 struct drm_i915_private *dev_priv = dev->dev_private;
9536
9537 /*
9538 * IVB has CPU eDP backlight regs too, set things up to let the
9539 * PCH regs control the backlight
9540 */
9541 I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE);
9542 I915_WRITE(BLC_PWM_CPU_CTL, 0);
9543 I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (1<<30));
9544}
9545
9533void intel_modeset_init_hw(struct drm_device *dev) 9546void intel_modeset_init_hw(struct drm_device *dev)
9534{ 9547{
9535 struct drm_i915_private *dev_priv = dev->dev_private; 9548 struct drm_i915_private *dev_priv = dev->dev_private;
@@ -9545,6 +9558,9 @@ void intel_modeset_init_hw(struct drm_device *dev)
9545 gen6_enable_rps(dev_priv); 9558 gen6_enable_rps(dev_priv);
9546 gen6_update_ring_freq(dev_priv); 9559 gen6_update_ring_freq(dev_priv);
9547 } 9560 }
9561
9562 if (IS_IVYBRIDGE(dev))
9563 ivb_pch_pwm_override(dev);
9548} 9564}
9549 9565
9550void intel_modeset_init(struct drm_device *dev) 9566void intel_modeset_init(struct drm_device *dev)