summaryrefslogtreecommitdiff
path: root/tests/i915/gem_tiled_wb.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-03-24 14:11:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-03-25 07:28:56 +0000
commit3d325bb211d8cd84c6862c9945185a937395cb44 (patch)
tree60f69ecdfc113b305acc474766d943f1b1f625c2 /tests/i915/gem_tiled_wb.c
parente65d6656673b8ee68100032161579f0609475f1e (diff)
i915: Mark up some forgotten set-domain
It is the user's responsibility to manage their domains. In libdrm, when you mmap a pointer, it calls set-domain automatically, but igt requires the caller to manage it explicitly, so do so. The vast majority already do correct manage the domain as they use the pointer into the mmap, just a few have been missed over the years. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_tiled_wb.c')
-rw-r--r--tests/i915/gem_tiled_wb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/i915/gem_tiled_wb.c b/tests/i915/gem_tiled_wb.c
index 827c2d9d..b7f352fc 100644
--- a/tests/i915/gem_tiled_wb.c
+++ b/tests/i915/gem_tiled_wb.c
@@ -72,6 +72,7 @@ create_bo(int fd)
* We then manually detile on reading back through the mmap(wc).
*/
data = gem_mmap__gtt(fd, handle, SIZE, PROT_READ | PROT_WRITE);
+ gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
for (i = 0; i < WIDTH*HEIGHT; i++)
data[i] = i;
munmap(data, SIZE);