intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] i915/gem_vm_create: Call set-domain manually
@ 2020-02-19 12:13 Chris Wilson
  0 siblings, 0 replies; only message in thread
From: Chris Wilson @ 2020-02-19 12:13 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

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>
---
 tests/i915/gem_vm_create.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/i915/gem_vm_create.c b/tests/i915/gem_vm_create.c
index cbd273d9d..e14b07b5f 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);
-- 
2.25.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-02-19 12:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 12:13 [Intel-gfx] [PATCH i-g-t] i915/gem_vm_create: Call set-domain manually Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).