From 3ec8b1d28e8d5ac924bd8f2e28baa31445bc5279 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 28 Jan 2016 13:59:57 +0000 Subject: [PATCH] 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 --- tests/gem_ringfill.c | 7 +++---- 1 file 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;