summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_exec_flush.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index d32c32dd..326cafa7 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -151,17 +151,17 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
munmap(ptr, 64*1024);
igt_timeout(timeout) {
- bool xor = (cycles >> 10) & 1;
+ bool xor = false;
int idx = cycles++ % 1024;
/* Inspect a different cacheline each iteration */
i = 16 * (idx % 64) + (idx / 64);
-
obj[1].relocs_ptr = (uintptr_t)&reloc0[i];
obj[2].relocs_ptr = (uintptr_t)&reloc1[i];
execbuf.batch_start_offset = 64*i;
- execbuf.buffer_count = 2 + xor;
+overwrite:
+ execbuf.buffer_count = 2 + xor;
gem_execbuf(fd, &execbuf);
if (flags & SET_DOMAIN) {
@@ -215,6 +215,11 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
igt_clflush_range(&map[i], sizeof(map[i]));
}
}
+
+ if (!xor) {
+ xor= true;
+ goto overwrite;
+ }
}
igt_info("Child[%d]: %lu cycles\n", child, cycles);