diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-03 21:12:12 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-03 21:13:41 +0100 |
commit | 6102e2eca949b6827def000407224f3c30a37204 (patch) | |
tree | 8f33d1be61259c7887868b84bd7afb1814b68a7b /tests/gem_exec_flush.c | |
parent | 7b7503fb6ccbe7fd05f712c3e286b42c30b084d7 (diff) |
igt/gem_exec_flush: Give even batch write a unique value
One property lost in the expansion for various coherency checks was
ensuring that every time we overwrote the batch it had a unique value
(to ensure that the GPU was seeing the latest value).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_flush.c')
-rw-r--r-- | tests/gem_exec_flush.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index fcd62bb3..bcc539f3 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -351,7 +351,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, b[-1] -= 1; *b++ = offset; } - *b++ = i; + *b++ = cycles + i; *b++ = MI_BATCH_BUFFER_END; switch (mode) { @@ -371,7 +371,6 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, break; } gem_execbuf(fd, &execbuf); - cycles++; execbuf.batch_start_offset += 64; reloc.offset += 64; @@ -379,14 +378,15 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, if (!(flags & COHERENT)) { gem_set_domain(fd, obj[0].handle, - I915_GEM_DOMAIN_CPU, - I915_GEM_DOMAIN_CPU); + I915_GEM_DOMAIN_CPU, + I915_GEM_DOMAIN_CPU); } else gem_sync(fd, obj[0].handle); for (i = 0; i < 1024; i++) { - igt_assert_eq(map[i], i); - map[i] = 0xabcdabcd; + igt_assert_eq_u32(map[i], cycles + i); + map[i] = 0xabcdabcd ^ cycles; } + cycles += 1024; if (mode == BATCH_USER) gem_sync(fd, obj[1].handle); |