summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-28 13:59:57 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-28 14:04:07 +0000
commit3ec8b1d28e8d5ac924bd8f2e28baa31445bc5279 (patch)
tree1546c9b5401667cc17a7908f266f4f002ff4b334 /tests
parenteaa03678b00179da89f194113c0740c033857c1c (diff)
igt/gem_ringfill: Set MI_MEM_VIRTUAL flag for gen<6
bit22 of MI_STORE_DWORD is confusing as the meaning changed between physical/virtual addressing in early gen and GTT/ppGTT in later gen. It looks like gen4 and gen5 still need the flag. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_ringfill.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index bd1f371b..2fa36d44 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -88,9 +88,9 @@ static void run_test(int fd, unsigned ring, unsigned flags)
uint32_t *batch, *b;
int i;
+ gem_require_ring(fd, ring);
igt_skip_on_f(gen == 6 && (ring & ~(3<<13)) == I915_EXEC_BSD,
"MI_STORE_DATA broken on gen6 bsd\n");
- gem_require_ring(fd, ring);
gem_quiescent_gpu(fd);
@@ -98,7 +98,7 @@ static void run_test(int fd, unsigned ring, unsigned flags)
execbuf.buffers_ptr = (uintptr_t)obj;
execbuf.buffer_count = 2;
execbuf.flags = ring | (1 << 11);
- if (gen < 4)
+ if (gen < 6)
execbuf.flags |= I915_EXEC_SECURE;
memset(obj, 0, sizeof(obj));
@@ -129,7 +129,7 @@ static void run_test(int fd, unsigned ring, unsigned flags)
reloc[i].write_domain = I915_GEM_DOMAIN_INSTRUCTION;
offset = obj[0].offset + reloc[i].delta;
- *b++ = MI_STORE_DWORD_IMM;
+ *b++ = MI_STORE_DWORD_IMM | (gen < 6 ? 1 << 22 : 0);
if (gen >= 8) {
*b++ = offset;
*b++ = offset >> 32;
@@ -139,7 +139,6 @@ static void run_test(int fd, unsigned ring, unsigned flags)
reloc[i].offset += sizeof(*batch);
} else {
b[-1] -= 1;
- b[-1] |= 1 << 22;
*b++ = offset;
}
*b++ = i;