]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Don't silently discard workarounds
authorDamien Lespiau <damien.lespiau@intel.com>
Sat, 30 Aug 2014 15:51:01 +0000 (16:51 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 3 Sep 2014 10:39:03 +0000 (12:39 +0200)
If we happen to emit more than I915_MAX_WA_REGS workarounds, we will
currently discard them, not even emit the LRI. Not really what we want,
so warn loudly.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 96618c0c508510e5a4c4ce04ec1a724c4496d7fc..5ef0f994b0bb32a83caa6f9e04cba19172305f09 100644 (file)
@@ -663,7 +663,7 @@ static inline void intel_ring_emit_wa(struct intel_engine_cs *ring,
        struct drm_device *dev = ring->dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
 
-       if (dev_priv->num_wa_regs >= I915_MAX_WA_REGS)
+       if (WARN_ON(dev_priv->num_wa_regs >= I915_MAX_WA_REGS))
                return;
 
        intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(1));