From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 8/9] drm/i915: Spruce up assert_sprites_disabled() Date: Thu, 6 Jun 2013 13:56:59 +0200 Message-ID: <20130606115659.GC7827@phenom.ffwll.local> References: <1370342947-20757-1-git-send-email-ville.syrjala@linux.intel.com> <1370342947-20757-9-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by gabe.freedesktop.org (Postfix) with ESMTP id D34FEE5C12 for ; Thu, 6 Jun 2013 04:57:03 -0700 (PDT) Received: by mail-ee0-f47.google.com with SMTP id e49so1148034eek.34 for ; Thu, 06 Jun 2013 04:57:03 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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: Rodrigo Vivi Cc: intel-gfx List-Id: intel-gfx@lists.freedesktop.org On Wed, Jun 05, 2013 at 04:39:58PM -0300, Rodrigo Vivi wrote: > Reviewed-by: Rodrigo Vivi > = > On Tue, Jun 4, 2013 at 7:49 AM, wrote: > > From: Ville Syrj=E4l=E4 > > > > Make assert_sprites_disabled() operational on all platforms where > > we currently have sprite support enabled. > > > > Signed-off-by: Ville Syrj=E4l=E4 I guess we eventually need some more abstract hw state readout for planes, similar to what we have on the output routing side. But this is good enough for now, so merged. -Daniel > > --- > > drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++-------- > > 1 file changed, 19 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i91= 5/intel_display.c > > index 9c89ddf..90d02c7 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -1132,19 +1132,30 @@ static void assert_planes_disabled(struct drm_i= 915_private *dev_priv, > > static void assert_sprites_disabled(struct drm_i915_private *dev_priv, > > enum pipe pipe) > > { > > + struct drm_device *dev =3D dev_priv->dev; > > int reg, i; > > u32 val; > > > > - if (!IS_VALLEYVIEW(dev_priv->dev)) > > - return; > > - > > - /* Need to check both planes against the pipe */ > > - for (i =3D 0; i < dev_priv->num_plane; i++) { > > - reg =3D SPCNTR(pipe, i); > > + if (IS_VALLEYVIEW(dev)) { > > + for (i =3D 0; i < dev_priv->num_plane; i++) { > > + reg =3D SPCNTR(pipe, i); > > + val =3D I915_READ(reg); > > + WARN((val & SP_ENABLE), > > + "sprite %c assertion failure, should be of= f on pipe %c but is still active\n", > > + sprite_name(pipe, i), pipe_name(pipe)); > > + } > > + } else if (INTEL_INFO(dev)->gen >=3D 7) { > > + reg =3D SPRCTL(pipe); > > + val =3D I915_READ(reg); > > + WARN((val & SPRITE_ENABLE), > > + "sprite %c assertion failure, should be off on pip= e %c but is still active\n", > > + plane_name(pipe), pipe_name(pipe)); > > + } else if (INTEL_INFO(dev)->gen >=3D 5) { > > + reg =3D DVSCNTR(pipe); > > val =3D I915_READ(reg); > > - WARN((val & SP_ENABLE), > > + WARN((val & DVS_ENABLE), > > "sprite %c assertion failure, should be off on pip= e %c but is still active\n", > > - sprite_name(pipe, i), pipe_name(pipe)); > > + plane_name(pipe), pipe_name(pipe)); > > } > > } > > > > -- > > 1.8.1.5 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > = > = > = > -- = > Rodrigo Vivi > Blog: http://blog.vivi.eng.br > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch