summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-05-06 11:41:06 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-05-06 11:42:02 +0100
commita10ef457ca778e1a560bc7635c0d1726ed191e6d (patch)
tree872e1aebe9dcd5423226f1fc4f0a27b0e5a9707b /tests
parent2c3144aaee6547c70720b80b7f00c0be8bb7c214 (diff)
igt/gem_exec_flush: Flush before each use
After we inspect map[i], we must flush again before checking map[i] for the xor pass. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_exec_flush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index 7e343d23..0d938fa9 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -171,11 +171,11 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
obj[2].relocs_ptr = (uintptr_t)&reloc1[i];
execbuf.batch_start_offset = 64*i;
+overwrite:
if ((flags & BEFORE) &&
!((flags & COHERENT) || gem_has_llc(fd)))
igt_clflush_range(&map[i], sizeof(map[i]));
-overwrite:
execbuf.buffer_count = 2 + xor;
gem_execbuf(fd, &execbuf);
@@ -227,7 +227,7 @@ overwrite:
if (flags & WRITE) {
map[i] = 0xdeadbeef;
- if (!(flags & COHERENT))
+ if (!(flags & (COHERENT | BEFORE)))
igt_clflush_range(&map[i], sizeof(map[i]));
}
}