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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-05-02 18:55:24 +01:00
parent 22e6157d38
commit d9025d3298

View File

@ -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);