summaryrefslogtreecommitdiff
path: root/tests/i915/gen3_render_tiledx_blits.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/gen3_render_tiledx_blits.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/gen3_render_tiledx_blits.c')
-rw-r--r--tests/i915/gen3_render_tiledx_blits.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/i915/gen3_render_tiledx_blits.c b/tests/i915/gen3_render_tiledx_blits.c
index e6246f2b..7efef589 100644
--- a/tests/i915/gen3_render_tiledx_blits.c
+++ b/tests/i915/gen3_render_tiledx_blits.c
@@ -297,6 +297,7 @@ create_bo(int fd, uint32_t val)
/* Fill the BO with dwords starting at val */
v = gem_mmap__gtt(fd, handle, WIDTH * HEIGHT * 4,
PROT_READ | PROT_WRITE);
+ gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
for (i = 0; i < WIDTH*HEIGHT; i++)
v[i] = val++;
munmap(v, WIDTH*HEIGHT*4);
@@ -311,6 +312,7 @@ check_bo(int fd, uint32_t handle, uint32_t val)
int i;
v = gem_mmap__gtt(fd, handle, WIDTH * HEIGHT * 4, PROT_READ);
+ gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, 0);
for (i = 0; i < WIDTH*HEIGHT; i++) {
igt_assert_f(v[i] == val,
"Expected 0x%08x, found 0x%08x "