Commit e6c1abb7 authored by Michel Thierry's avatar Michel Thierry Committed by Daniel Vetter

drm/i915: Warn about missing context state workarounds only once

Otherwise, new platforms without workarounds will hit this warning for
every new context created.

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarMichel Thierry <michel.thierry@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 2f82bbdf
...@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring, ...@@ -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 drm_i915_private *dev_priv = dev->dev_private;
struct i915_workarounds *w = &dev_priv->workarounds; struct i915_workarounds *w = &dev_priv->workarounds;
if (WARN_ON(w->count == 0)) if (WARN_ON_ONCE(w->count == 0))
return 0; return 0;
ring->gpu_caches_dirty = true; ring->gpu_caches_dirty = true;
......
...@@ -679,7 +679,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring, ...@@ -679,7 +679,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct i915_workarounds *w = &dev_priv->workarounds; struct i915_workarounds *w = &dev_priv->workarounds;
if (WARN_ON(w->count == 0)) if (WARN_ON_ONCE(w->count == 0))
return 0; return 0;
ring->gpu_caches_dirty = true; ring->gpu_caches_dirty = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment