diff options
| author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-16 17:49:46 +0000 |
|---|---|---|
| committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-16 17:54:16 +0000 |
| commit | 136d6c796141b9b9fc9c96fe57dc2352c5224548 (patch) | |
| tree | f296871ec487eef615698fa739942d728c4e384b /tests | |
| parent | 59adb00129acd1f9aff76edd19f7774876149d4f (diff) | |
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>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gem_streaming_writes.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |
