[Intel-gfx] [PATCH] drm/i915: Warn about missing context state workarounds only once

Daniel Vetter daniel at ffwll.ch
Mon Dec 15 07:54:18 PST 2014


On Mon, Dec 15, 2014 at 03:40:11PM +0000, Tvrtko Ursulin wrote:
> 
> Backtraces make me jump and this one is very noisy, please merge. :)

It's kinda the point ;-)

> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Queued for -next, thanks for the patch.
-Daniel
> 
> On 11/26/2014 02:21 PM, Michel Thierry wrote:
> >Otherwise, new platforms without workarounds will hit this warning for
> >every new context created.
> >
> >Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> >Signed-off-by: Michel Thierry <michel.thierry at 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 4d41f5a..4111cdd 100644
> >--- a/drivers/gpu/drm/i915/intel_lrc.c
> >+++ b/drivers/gpu/drm/i915/intel_lrc.c
> >@@ -1164,7 +1164,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(w->count == 0))
> >+	if (WARN_ON_ONCE(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 1d01b51..104edf6 100644
> >--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> >+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> >@@ -669,7 +669,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(w->count == 0))
> >+	if (WARN_ON_ONCE(w->count == 0))
> >  		return 0;
> >
> >  	ring->gpu_caches_dirty = true;
> >
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at 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


More information about the Intel-gfx mailing list