From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Mask out hardware status bits from VLV DPLL register Date: Wed, 26 Jun 2013 20:49:06 +0200 Message-ID: <20130626184906.GK18285@phenom.ffwll.local> References: <1372257855-13867-1-git-send-email-ville.syrjala@linux.intel.com> <20130626092533.07cb419e@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f170.google.com (mail-ea0-f170.google.com [209.85.215.170]) by gabe.freedesktop.org (Postfix) with ESMTP id BD10BE640D for ; Wed, 26 Jun 2013 11:49:08 -0700 (PDT) Received: by mail-ea0-f170.google.com with SMTP id h10so7896291eaj.1 for ; Wed, 26 Jun 2013 11:49:08 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130626092533.07cb419e@jbarnes-desktop> 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 Wed, Jun 26, 2013 at 09:25:33AM -0700, Jesse Barnes wrote: > On Wed, 26 Jun 2013 17:44:15 +0300 > ville.syrjala@linux.intel.com wrote: > = > > From: Ville Syrj=E4l=E4 > > = > > The DPLL lock bit, and the DPIO phy status bits are read-only and > > controlled by the hardware, so they will never be set by the driver. > > Mask them out when reading the hw state, so that the state > > comparison won't fail. > > = > > Signed-off-by: Ville Syrj=E4l=E4 > > --- > > drivers/gpu/drm/i915/intel_display.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > = > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 259ea4b..d67a9f5 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -4958,6 +4958,10 @@ static bool i9xx_get_pipe_config(struct intel_cr= tc *crtc, > > if (!IS_VALLEYVIEW(dev)) { > > pipe_config->dpll_hw_state.fp0 =3D I915_READ(FP0(crtc->pipe)); > > pipe_config->dpll_hw_state.fp1 =3D I915_READ(FP1(crtc->pipe)); > > + } else { > > + pipe_config->dpll_hw_state.dpll &=3D ~(DPLL_LOCK_VLV | > > + DPLL_PORTC_READY_MASK | > > + DPLL_PORTB_READY_MASK); > > } > > = > > return true; > = > As a rule I'd like to see comments explaining this too, so we don't > have to dig through the changelog to figure it out. But that's no > biggie here, so: Very much agreed on the need for a comment here, so I've added a one-liner. > Reviewed-by: Jesse Barnes Queued for -next, thanks for the patch. -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch