<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [v4.10 snb] weird seqno/request tracking - HEAD overtakes TAIL"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99671#c44">Comment # 44</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [v4.10 snb] weird seqno/request tracking - HEAD overtakes TAIL"
href="https://bugs.freedesktop.org/show_bug.cgi?id=99671">bug 99671</a>
from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
<pre>Test to see if we ever write requests out-of-order:
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);
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
<li>You are the QA Contact for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>