[Intel-gfx] [PATCH 2/5] drm/i915: enable/disable backlight for eDP

Jesse Barnes jbarnes at virtuousgeek.org
Tue Oct 23 00:04:58 CEST 2012


On Sat, 20 Oct 2012 20:57:42 +0200
Daniel Vetter <daniel.vetter at ffwll.ch> wrote:

> Like we already do for the LVDS panels. This seems to help greatly
> in setting up the backlight, since the BIOS might refuse to cooperate.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 265cec1..49846c0 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1128,6 +1128,8 @@ static void ironlake_edp_panel_off(struct intel_dp *intel_dp)
>  
>  	DRM_DEBUG_KMS("Turn eDP power off\n");
>  
> +	intel_panel_disable_backlight(dev);
> +
>  	WARN(!intel_dp->want_panel_vdd, "Need VDD to turn off panel\n");
>  
>  	pp = ironlake_get_pp_control(dev_priv);
> @@ -1146,6 +1148,7 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
>  {
>  	struct drm_device *dev = intel_dp->base.base.dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
> +	int pipe = to_intel_crtc(intel_dp->base.base.crtc)->pipe;
>  	u32 pp;
>  
>  	if (!is_edp(intel_dp))
> @@ -1163,6 +1166,8 @@ static void ironlake_edp_backlight_on(struct intel_dp *intel_dp)
>  	pp |= EDP_BLC_ENABLE;
>  	I915_WRITE(PCH_PP_CONTROL, pp);
>  	POSTING_READ(PCH_PP_CONTROL);
> +
> +	intel_panel_enable_backlight(dev, pipe);
>  }
>  
>  static void ironlake_edp_backlight_off(struct intel_dp *intel_dp)

Probably wise.

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list