summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-09-09 13:40:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-09-10 13:00:25 +0100
commit57e3d826dee154cb8664667db7660d854a707fc6 (patch)
tree2dc078138d787d25da1aa6a18f6c3821c64f7583
parent40de31df52ffed5e392d607a83e3aea4efb150e6 (diff)
igt/gem_exec_capture: Fix command emission for gen3
A missing no-op causing us to emit the wrong address when relocation was required for BB_START. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106028 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106078 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
-rw-r--r--tests/gem_exec_capture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/gem_exec_capture.c b/tests/gem_exec_capture.c
index 2dc06ce4..3e4a4377 100644
--- a/tests/gem_exec_capture.c
+++ b/tests/gem_exec_capture.c
@@ -117,7 +117,7 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
batch[++i] = 0;
}
batch[++i] = 0xc0ffee;
- if (gen < 3)
+ if (gen < 4)
batch[++i] = MI_NOOP;
batch[++i] = MI_BATCH_BUFFER_START; /* not crashed? try again! */
@@ -144,10 +144,12 @@ static void __capture(int fd, int dir, unsigned ring, uint32_t target)
execbuf.flags = ring;
if (gen > 3 && gen < 6)
execbuf.flags |= I915_EXEC_SECURE;
+
+ igt_assert(!READ_ONCE(*seqno));
gem_execbuf(fd, &execbuf);
/* Wait for the request to start */
- while (*(volatile uint32_t *)seqno != 0xc0ffee)
+ while (READ_ONCE(*seqno) != 0xc0ffee)
igt_assert(gem_bo_busy(fd, obj[SCRATCH].handle));
munmap(seqno, 4096);