From bfbe813f8fb587017c4e1d73c51395c2837eb395 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 29 May 2012 22:14:06 +0200 Subject: lib: fix gen5 workaround emission Using BEGIN_BATCH can lead to a nice inf recursion through require_space -> flush_batch -> BEGIN_BATCH. Also fix things up to always require BATCH_RESERVED. We need 2 dwords for the gen5 workaround and 2 dwords for MI_BB_END. --- lib/intel_batchbuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/intel_batchbuffer.h') diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h index 4dffda7e..5a1fc178 100644 --- a/lib/intel_batchbuffer.h +++ b/lib/intel_batchbuffer.h @@ -63,7 +63,7 @@ static inline void intel_batchbuffer_require_space(struct intel_batchbuffer *batch, unsigned int sz) { - assert(sz < BATCH_SZ - 8); + assert(sz < BATCH_SZ - BATCH_RESERVED); if (intel_batchbuffer_space(batch) < sz) intel_batchbuffer_flush(batch); } -- cgit v1.2.3