[PATCH 6/6] drm/i915: Assert that the last request in the ring matches

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 7 10:10:19 UTC 2018


Check that as we retire the last request, it was indeed the last request
in the ring.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_request.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index efa9ee557f31..81b9fbbf5f5c 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -359,6 +359,7 @@ static void advance_ring(struct i915_request *request)
 		 * noops - they are safe to be replayed on a reset.
 		 */
 		tail = READ_ONCE(request->ring->tail);
+		GEM_BUG_ON(request->tail != tail);
 	} else {
 		tail = request->postfix;
 	}
-- 
2.16.2



More information about the Intel-gfx-trybot mailing list