[Intel-gfx] [PATCH 3/5] drm/i915: Don't silently discard workarounds

Damien Lespiau damien.lespiau at intel.com
Sat Aug 30 17:51:01 CEST 2014


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 at intel.com>
---
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 96618c0..5ef0f99 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -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));
-- 
1.8.3.1




More information about the Intel-gfx mailing list