From: Daniel Vetter <daniel@ffwll.ch>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 8/9] drm/i915: Spruce up assert_sprites_disabled()
Date: Thu, 6 Jun 2013 13:56:59 +0200 [thread overview]
Message-ID: <20130606115659.GC7827@phenom.ffwll.local> (raw)
In-Reply-To: <CABVU7+vCgHTPuzFNeVN9cA8Y=51pHpoNKcUsx19wnt=EPZ-X8w@mail.gmail.com>
On Wed, Jun 05, 2013 at 04:39:58PM -0300, Rodrigo Vivi wrote:
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
>
> On Tue, Jun 4, 2013 at 7:49 AM, <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Make assert_sprites_disabled() operational on all platforms where
> > we currently have sprite support enabled.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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/i915/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_i915_private *dev_priv,
> > static void assert_sprites_disabled(struct drm_i915_private *dev_priv,
> > enum pipe pipe)
> > {
> > + struct drm_device *dev = 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 = 0; i < dev_priv->num_plane; i++) {
> > - reg = SPCNTR(pipe, i);
> > + if (IS_VALLEYVIEW(dev)) {
> > + for (i = 0; i < dev_priv->num_plane; i++) {
> > + reg = SPCNTR(pipe, i);
> > + val = I915_READ(reg);
> > + WARN((val & SP_ENABLE),
> > + "sprite %c assertion failure, should be off on pipe %c but is still active\n",
> > + sprite_name(pipe, i), pipe_name(pipe));
> > + }
> > + } else if (INTEL_INFO(dev)->gen >= 7) {
> > + reg = SPRCTL(pipe);
> > + val = I915_READ(reg);
> > + WARN((val & SPRITE_ENABLE),
> > + "sprite %c assertion failure, should be off on pipe %c but is still active\n",
> > + plane_name(pipe), pipe_name(pipe));
> > + } else if (INTEL_INFO(dev)->gen >= 5) {
> > + reg = DVSCNTR(pipe);
> > val = I915_READ(reg);
> > - WARN((val & SP_ENABLE),
> > + WARN((val & DVS_ENABLE),
> > "sprite %c assertion failure, should be off on pipe %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
next prev parent reply other threads:[~2013-06-06 11:57 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 10:48 [PATCH 0/9] drm/i915: Unify some modeset sequences v2 ville.syrjala
2013-06-04 10:48 ` [PATCH v2 1/9] drm/i915: Always load the display palette before enabling the pipe ville.syrjala
2013-06-05 19:20 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH 2/9] drm/i915: Always enable the cursor right after the primary plane ville.syrjala
2013-06-05 19:21 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH 3/9] drm/i915: Enable the overlay right after primary and cursor planes ville.syrjala
2013-06-05 19:22 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH v2 4/9] drm/i915: Follow the same sequence when disabling planes ville.syrjala
2013-06-05 19:23 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH 5/9] drm/i915: Drop overlay DPMS call from valleyview_crtc_enable ville.syrjala
2013-06-05 19:27 ` Rodrigo Vivi
2013-06-05 19:49 ` Ville Syrjälä
2013-06-04 10:49 ` [PATCH v2 6/9] drm/i915: Disable/restore all sprite planes around modeset ville.syrjala
2013-06-05 19:32 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH 7/9] drm/i915: Improve assert_planes_disabled() ville.syrjala
2013-06-05 19:33 ` Rodrigo Vivi
2013-06-04 10:49 ` [PATCH 8/9] drm/i915: Spruce up assert_sprites_disabled() ville.syrjala
2013-06-05 19:39 ` Rodrigo Vivi
2013-06-06 11:56 ` Daniel Vetter [this message]
2013-06-04 10:49 ` [PATCH 9/9] drm/i915: Assert dpll running in intel_crtc_load_lut() on pre-PCH platforms ville.syrjala
2013-06-05 19:41 ` Rodrigo Vivi
2013-06-05 19:58 ` Ville Syrjälä
2013-06-06 11:59 ` Daniel Vetter
2013-06-05 20:40 ` Daniel Vetter
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=20130606115659.GC7827@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.