From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915: Don't complain when there is no workaround.
Date: Thu, 18 Dec 2014 21:17:39 +0200 [thread overview]
Message-ID: <20141218191738.GP10649@intel.com> (raw)
In-Reply-To: <CABVU7+tARmwkuK7tJE-MDKYdJG456FqSkWibcEAiC-Z5SQ8C=Q@mail.gmail.com>
On Thu, Dec 18, 2014 at 10:47:11AM -0800, Rodrigo Vivi wrote:
> Yeah, but Skylake is running and we didn't need any W/A here yet. The
> warning is just disturbing dmesg with 3 ops and not forcing uns to
> hunt for missing workarouinds.
>
> We add W/A based on specific needs, not based on counts.
I can immediately see two w/as in gen9_init_clock_gating() that need to be
moved over to the new way of doing things.
>
> On Thu, Dec 18, 2014 at 8:26 AM, Dave Gordon <david.s.gordon@intel.com> wrote:
> > On 18/12/14 08:16, Daniel Vetter wrote:
> >> On Wed, Dec 17, 2014 at 08:34:41AM -0800, Rodrigo Vivi wrote:
> >>> When we don't have any workaround to emit we should celebrate, not bother.
> >>
> >> Well except that on the platforms where this fires we really should have
> >> some, most likely. This is in a way similar to all the other WARN_ON cases
> >> we have to make sure nothing gets lost in platform enabling.
> >> -Daniel
> >
> > You could have a convention that
> > (count == 0)
> > means "I haven't filled this in yet" (and generates a warning), whereas
> > (count == I915_NO_WORKAROUNDS_REQUIRED)
> > (which can be defined as (~0)) means "I haven't forgotten, there really
> > aren't any workarounds" and suppresses the warning.
> >
> > Of course, any /other/ value > I915_MAX_WA_REGS should definitely give a
> > warning, preferably at compile time!
> >
> > .Dave
> >
> >>>
> >>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >>> ---
> >>> drivers/gpu/drm/i915/intel_lrc.c | 2 +-
> >>> drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
> >>> 2 files changed, 2 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> >>> index 7670a0f..0bb50f6 100644
> >>> --- a/drivers/gpu/drm/i915/intel_lrc.c
> >>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> >>> @@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
> >>> struct drm_i915_private *dev_priv = dev->dev_private;
> >>> struct i915_workarounds *w = &dev_priv->workarounds;
> >>>
> >>> - if (WARN_ON_ONCE(w->count == 0))
> >>> + if (w->count == 0)
> >>> return 0;
> >>>
> >>> ring->gpu_caches_dirty = true;
> >>> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> >>> index 12a36f0..3d99bb1 100644
> >>> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> >>> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> >>> @@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
> >>> struct drm_i915_private *dev_priv = dev->dev_private;
> >>> struct i915_workarounds *w = &dev_priv->workarounds;
> >>>
> >>> - if (WARN_ON_ONCE(w->count == 0))
> >>> + if (w->count == 0)
> >>> return 0;
> >>>
> >>> ring->gpu_caches_dirty = true;
> >>> --
> >>> 1.9.3
> >>>
> >>> _______________________________________________
> >>> Intel-gfx mailing list
> >>> Intel-gfx@lists.freedesktop.org
> >>> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >>
> >
> > _______________________________________________
> > 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
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2014-12-18 19:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 16:34 [PATCH] drm/i915: Don't complain when there is no workaround Rodrigo Vivi
2014-12-18 7:19 ` shuang.he
2014-12-18 8:16 ` Daniel Vetter
2014-12-18 16:26 ` Dave Gordon
2014-12-18 18:47 ` Rodrigo Vivi
2014-12-18 19:17 ` Ville Syrjälä [this message]
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=20141218191738.GP10649@intel.com \
--to=ville.syrjala@linux.intel.com \
--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.