summaryrefslogtreecommitdiff
path: root/tests/i915/gem_ctx_exec.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-07-13 10:57:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-07-13 11:02:31 +0100
commit2a99e5bb011c4e2f404b2eadcc2105de023d3c8f (patch)
tree46ac2423c95bd7789e2a2729db0edf5d344f94e7 /tests/i915/gem_ctx_exec.c
parent03de2b70938687e762fe1de940e0a1099a3179a5 (diff)
i915/gem_ctx_exec: Set a fast preempt timeout for nohangcheck
We want the test to run in a reasonable time, and verify that if the hangcheck modparam is disabled we can still recover from a dead context. The issue is that we've disabled preempt_timeout on tgl/rcs0 by default, and so since we want this test to be fast, we need to re-enable it for the test. Otherwise, we would have to wait several seconds for the heartbeat to notice the hung engine, exceeding the limits imposed on the test. 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_exec.c')
-rw-r--r--tests/i915/gem_ctx_exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 7c6c5bff..194191de 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -289,6 +289,10 @@ static void nohangcheck_hostile(int i915)
igt_spin_t *spin;
int new;
+ /* Set a fast hang detection for a dead context */
+ gem_engine_property_printf(i915, e->name,
+ "preempt_timeout_ms", "%d", 50);
+
spin = __igt_spin_new(i915, ctx,
.engine = e->flags,
.flags = (IGT_SPIN_NO_PREEMPTION |