summaryrefslogtreecommitdiff
path: root/tests/i915/gem_ctx_persistence.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2021-01-29 11:05:07 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2021-01-29 11:54:08 +0000
commit57f171707c71560673b4cd0759d3e726883279db (patch)
treed0b738806f57356c177db68cc8d6f16613ec914a /tests/i915/gem_ctx_persistence.c
parente1e5b3fea2baafdae0160940ecb8bf0242703840 (diff)
i915/gem_ctx_persistence: Wait for spinner before reseting
Just reset the spinner once before launching and killing many non-persistent contexts. 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_ctx_persistence.c')
-rw-r--r--tests/i915/gem_ctx_persistence.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index b45a1454..10d057f1 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -1082,6 +1082,9 @@ static void many_contexts(int i915)
spin = igt_spin_new(i915, .flags = IGT_SPIN_NO_PREEMPTION);
igt_spin_end(spin);
+ gem_sync(i915, spin->handle);
+ igt_spin_reset(spin);
+
igt_until_timeout(30) {
__for_each_physical_engine(i915, e) {
uint32_t ctx;
@@ -1089,7 +1092,6 @@ static void many_contexts(int i915)
ctx = gem_context_clone_with_engines(i915, 0);
gem_context_set_persistence(i915, ctx, false);
- igt_spin_reset(spin);
spin->execbuf.rsvd1 = ctx;
spin->execbuf.flags &= ~63;
spin->execbuf.flags |= e->flags;
@@ -1097,6 +1099,7 @@ static void many_contexts(int i915)
gem_context_destroy(i915, ctx);
}
}
+ igt_debugfs_dump(i915, "i915_engine_info");
igt_assert_eq(gem_wait(i915, spin->handle, &timeout), 0);
/* And check we can still submit to the default context -- no bans! */