From d9025d3298d8cb647b754e7f5d5e95e3dca67244 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 2 May 2016 18:55:24 +0100 Subject: [PATCH] igt/gem_exec_flush: Match gem_set_domain to pointer access When using the kernel set-domain cache management, we need to set the domain as appropriate for our pointer access. In this case we access the buffer through a CPU mmap, and so we must request access via the CPU domain. Signed-off-by: Chris Wilson --- tests/gem_exec_flush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index 326cafa7..1b5172c6 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -167,8 +167,8 @@ overwrite: if (flags & SET_DOMAIN) { igt_interruptible(flags & INTERRUPTIBLE) gem_set_domain(fd, obj[0].handle, - I915_GEM_DOMAIN_GTT, - (flags & WRITE) ? I915_GEM_DOMAIN_GTT : 0); + I915_GEM_DOMAIN_CPU, + (flags & WRITE) ? I915_GEM_DOMAIN_CPU : 0); if (xor) igt_assert_eq_u32(map[i], i ^ 0xffffffff);