<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [PNV Bisected]igt/gem_exec_big fails"
href="https://bugs.freedesktop.org/show_bug.cgi?id=88191#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [PNV Bisected]igt/gem_exec_big fails"
href="https://bugs.freedesktop.org/show_bug.cgi?id=88191">bug 88191</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>So far it looks like it has uncovered a nasty coherency issue between pwrite +
set-to-domain + relocate + pread.
Forcing pwrite to use GTT, makes it work, as does removing the user
set-to-domain. It also seems to be timing dependent (but it fails quite
reproducibly), adding printk also makes it work.
Throwing i915_gem_chipset_flush() around is not sufficient. But...
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index c7f4048..831cef2 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -332,6 +332,8 @@ relocate_entry_gtt(struct drm_i915_gem_object *obj,
if (ret)
return ret;
+ mb();
+
/* Map the page containing the relocation we're going to perform. */
offset = i915_gem_obj_ggtt_offset(obj);
offset += reloc->offset;
@@ -355,6 +357,7 @@ relocate_entry_gtt(struct drm_i915_gem_object *obj,
io_mapping_unmap_atomic(reloc_page);
+ mb();
return 0;
}
crazily enough does. And notably
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index c7f4048..3da285a 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -880,7 +880,7 @@ vmas_move_to_rq(struct eb_vmas *eb,
i915_gem_chipset_flush(rq->i915);
if (flush_domains & I915_GEM_DOMAIN_GTT)
- wmb();
+ mb();
/* 2: invalidate the caches from this ring after emitting semaphores */
ret = i915_request_emit_flush(rq, I915_INVALIDATE_CACHES);
does not. Hmm.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>