From 136d6c796141b9b9fc9c96fe57dc2352c5224548 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 16 Jan 2016 17:49:46 +0000 Subject: [PATCH] igt/gem_streaming_writes: Set the initial CPU write domain Remove one assumption from the test and amek the domain management explict - when we write through the CPU to construction the batch, mark it as having been written. Signed-off-by: Chris Wilson --- tests/gem_streaming_writes.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gem_streaming_writes.c b/tests/gem_streaming_writes.c index 5b365c9b..0406aa62 100644 --- a/tests/gem_streaming_writes.c +++ b/tests/gem_streaming_writes.c @@ -154,6 +154,8 @@ static void test_streaming(int fd, int mode, int sync) batch[i].offset = 0; base = gem_mmap__cpu(fd, batch[i].handle, 0, 4096, PROT_WRITE); + gem_set_domain(fd, batch[i].handle, + I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); for (int j = 0; j < 64; j++) { unsigned x = (n * CHUNK_SIZE) % 4096 >> 2;