From: Daniel Vetter Subject: Re: [PATCH 3/3] drm/i915: allow PCH PWM override on IVB Date: Tue, 10 Apr 2012 23:50:45 +0200 Message-ID: <20120410215045.GO4115@phenom.ffwll.local> References: <1334084285-4770-1-git-send-email-jbarnes@virtuousgeek.org> <1334084285-4770-3-git-send-email-jbarnes@virtuousgeek.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 3B3179E74E for ; Tue, 10 Apr 2012 14:49:53 -0700 (PDT) Received: by werp11 with SMTP id p11so207590wer.36 for ; Tue, 10 Apr 2012 14:49:52 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1334084285-4770-3-git-send-email-jbarnes@virtuousgeek.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.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 > --- > 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