[Intel-gfx] [PATCH 3/3] drm/i915: allow PCH PWM override on IVB

Daniel Vetter daniel at ffwll.ch
Tue Apr 10 23:50:45 CEST 2012


On Tue, Apr 10, 2012 at 11:58:05AM -0700, Jesse Barnes wrote:
> 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.
> 
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_panel.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
> index cad45ff..b007c4e 100644
> --- a/drivers/gpu/drm/i915/intel_panel.c
> +++ b/drivers/gpu/drm/i915/intel_panel.c
> @@ -306,6 +306,18 @@ static void intel_panel_init_backlight(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
> +	 */
> +	if (IS_IVYBRIDGE(dev)) {
> +		u32 pwm;

That pwm thing seems unused ...
-Daniel
> +
> +		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));
> +	}
> +
>  	dev_priv->backlight_level = intel_panel_get_backlight(dev);
>  	dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
>  }
> -- 
> 1.7.4.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list