From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 19/26] drm/i915: DSPFW and BLC regs are in the display offset range Date: Fri, 8 Mar 2013 08:54:09 -0800 Message-ID: <20130308085409.3721c6ba@jbarnes-desktop> References: <1362175722-9281-1-git-send-email-jbarnes@virtuousgeek.org> <1362175722-9281-19-git-send-email-jbarnes@virtuousgeek.org> <877gliuh8g.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy14-pub.unifiedlayer.com (oproxy14-pub.unifiedlayer.com [67.222.51.224]) by gabe.freedesktop.org (Postfix) with SMTP id 6ABA4E6E4B for ; Fri, 8 Mar 2013 08:53:44 -0800 (PST) In-Reply-To: <877gliuh8g.fsf@intel.com> 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: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, 08 Mar 2013 15:57:19 +0200 Jani Nikula wrote: > > I also had this as a quick fix to the backlight access; it's also > incomplete wrt the backlight registers. > > --- a/drivers/gpu/drm/i915/intel_panel.c > +++ b/drivers/gpu/drm/i915/intel_panel.c > @@ -121,6 +121,9 @@ static int is_backlight_combination_mode(struct drm_device *dev) > { > struct drm_i915_private *dev_priv = dev->dev_private; > > + if (IS_VALLEYVIEW(dev)) > + return 0; > + > if (INTEL_INFO(dev)->gen >= 4) > return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE; > > @@ -338,12 +341,15 @@ void intel_panel_enable_backlight(struct drm_device *dev, > if (tmp & BLM_PWM_ENABLE) > goto set_level; > > - if (dev_priv->num_pipe == 3) > - tmp &= ~BLM_PIPE_SELECT_IVB; > - else > - tmp &= ~BLM_PIPE_SELECT; > + /* XXX: VLV per pipe registers */ > + if (!IS_VALLEYVIEW(dev)) { > + if (dev_priv->num_pipe == 3) > + tmp &= ~BLM_PIPE_SELECT_IVB; > + else > + tmp &= ~BLM_PIPE_SELECT; > > - tmp |= BLM_PIPE(pipe); > + tmp |= BLM_PIPE(pipe); > + } > tmp &= ~BLM_PWM_ENABLE; > > I915_WRITE(reg, tmp); > Ok I'll try that out, thanks. -- Jesse Barnes, Intel Open Source Technology Center