diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-24 14:11:16 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-03-25 07:28:56 +0000 |
commit | 3d325bb211d8cd84c6862c9945185a937395cb44 (patch) | |
tree | 60f69ecdfc113b305acc474766d943f1b1f625c2 /tests/i915/gem_tiled_fence_blits.c | |
parent | e65d6656673b8ee68100032161579f0609475f1e (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_fence_blits.c')
-rw-r--r-- | tests/i915/gem_tiled_fence_blits.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/i915/gem_tiled_fence_blits.c b/tests/i915/gem_tiled_fence_blits.c index 2453bcc0..aacd42b7 100644 --- a/tests/i915/gem_tiled_fence_blits.c +++ b/tests/i915/gem_tiled_fence_blits.c @@ -58,6 +58,7 @@ static uint32_t create_bo(int fd, uint32_t start_val) /* Fill the BO with dwords starting at start_val */ ptr = gem_mmap__gtt(fd, handle, bo_size, PROT_WRITE); + gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); for (int i = 0; i < width * height; i++) ptr[i] = start_val++; munmap(ptr, bo_size); @@ -70,6 +71,7 @@ static void check_bo(int fd, uint32_t handle, uint32_t start_val) uint32_t *ptr; ptr = gem_mmap__gtt(fd, handle, bo_size, PROT_READ); + gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, 0); igt_memcpy_from_wc(linear, ptr, bo_size); munmap(ptr, bo_size); |