提交 f82cfb6b 编写于 作者: J Jesse Barnes 提交者: Daniel Vetter

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: NJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 b6834bd6
...@@ -9530,6 +9530,19 @@ static void i915_disable_vga(struct drm_device *dev) ...@@ -9530,6 +9530,19 @@ static void i915_disable_vga(struct drm_device *dev)
POSTING_READ(vga_reg); POSTING_READ(vga_reg);
} }
static void ivb_pch_pwm_override(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
/*
* IVB has CPU eDP backlight regs too, set things up to let the
* PCH regs control the backlight
*/
I915_WRITE(BLC_PWM_CPU_CTL2, PWM_ENABLE);
I915_WRITE(BLC_PWM_CPU_CTL, 0);
I915_WRITE(BLC_PWM_PCH_CTL1, PWM_ENABLE | (1<<30));
}
void intel_modeset_init_hw(struct drm_device *dev) void intel_modeset_init_hw(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
...@@ -9545,6 +9558,9 @@ void intel_modeset_init_hw(struct drm_device *dev) ...@@ -9545,6 +9558,9 @@ void intel_modeset_init_hw(struct drm_device *dev)
gen6_enable_rps(dev_priv); gen6_enable_rps(dev_priv);
gen6_update_ring_freq(dev_priv); gen6_update_ring_freq(dev_priv);
} }
if (IS_IVYBRIDGE(dev))
ivb_pch_pwm_override(dev);
} }
void intel_modeset_init(struct drm_device *dev) void intel_modeset_init(struct drm_device *dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册