diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-02-19 12:11:35 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-02-19 12:27:06 +0000 |
commit | d8618580c9398701dc23a6496c5e7cdf266c7fa2 (patch) | |
tree | fff5dcb03864da488687d6f57fa9d530e544d2c3 /tests/i915/gem_vm_create.c | |
parent | dfba090e720ed4e043158887f1ba6a76059491e8 (diff) |
i915/gem_vm_create: Call set-domain manually
Since we are secretly using execbuf to write into an object's location,
then read back from the object we must manually handle the domain
changes.
Closes: https://gitlab.freedesktop.org/drm/intel/issues/314
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_vm_create.c')
-rw-r--r-- | tests/i915/gem_vm_create.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/i915/gem_vm_create.c b/tests/i915/gem_vm_create.c index cbd273d9..e14b07b5 100644 --- a/tests/i915/gem_vm_create.c +++ b/tests/i915/gem_vm_create.c @@ -324,11 +324,15 @@ static void isolation(int i915) gem_execbuf(i915, &eb); /* bind object into vm[0] */ /* Verify the trick with the assumed target address works */ + gem_set_domain(i915, obj[0].handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); write_to_address(i915, ctx[0], obj[0].offset, 1); gem_read(i915, obj[0].handle, 0, &result, sizeof(result)); igt_assert_eq(result, 1); /* Now check that we can't write to vm[0] from second fd/vm */ + gem_set_domain(i915, obj[0].handle, + I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT); write_to_address(other, ctx[1], obj[0].offset, 2); gem_read(i915, obj[0].handle, 0, &result, sizeof(result)); igt_assert_eq(result, 1); |