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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2016-01-16 17:49:46 +00:00
parent 59adb00129
commit 136d6c7961

View File

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