Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: allow PCH PWM override on IVB
Date: Tue, 10 Apr 2012 23:50:45 +0200	[thread overview]
Message-ID: <20120410215045.GO4115@phenom.ffwll.local> (raw)
In-Reply-To: <1334084285-4770-3-git-send-email-jbarnes@virtuousgeek.org>

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@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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

  reply	other threads:[~2012-04-10 21:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-10 18:58 [PATCH 1/3] drm/i915: make DP configuration vars less confusing in ironlake_crtc_mode_se Jesse Barnes
2012-04-10 18:58 ` [PATCH 2/3] drm/i915: check PPS regs for sanity when using eDP Jesse Barnes
2012-04-10 18:59   ` Jesse Barnes
2012-04-10 21:26   ` Chris Wilson
2012-04-11 16:04     ` Daniel Vetter
2012-04-10 18:58 ` [PATCH 3/3] drm/i915: allow PCH PWM override on IVB Jesse Barnes
2012-04-10 21:50   ` Daniel Vetter [this message]
2012-04-10 22:00     ` Jesse Barnes
2012-04-10 21:22 ` [PATCH 1/3] drm/i915: make DP configuration vars less confusing in ironlake_crtc_mode_se Chris Wilson
2012-04-11  9:53   ` Daniel Vetter
2012-04-11 15:56     ` Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120410215045.GO4115@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox