From 55767d7fcca8d517fd7d8e947fba8f85cfd9636c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 18 Mar 2017 16:39:33 +0000 Subject: [PATCH] hmm --- drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index be908e2a52ea..da610ce176a9 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -784,6 +784,16 @@ static void i9xx_submit_request(struct drm_i915_gem_request *request) i915_gem_request_submit(request); + { + u32 head = I915_READ_HEAD(request->engine) & HEAD_ADDR; + u32 tail = I915_READ_TAIL(request->engine) & HEAD_ADDR; + int prev = __intel_ring_space(tail, head, request->ring->size); + int next = __intel_ring_space(request->tail, head, request->ring->size); + WARN(head != tail && next <= prev, + "Bacwards we go: head=%x, tail=%x, next=%x\n", + head, tail, request->tail); + } + GEM_BUG_ON(!IS_ALIGNED(request->tail, 8)); I915_WRITE_TAIL(request->engine, request->tail); } -- 2.11.0