[PATCH i-g-t] tests/i915/gem_ctx_persistence: adjust timeout according to engines

Andrzej Hajda andrzej.hajda at intel.com
Fri Dec 2 15:09:34 UTC 2022


With introduction of long running compute context preemption timeouts
in some engines (rcs and ccs) can be quite big (by default 7.5s).
Keeping spinner timeout to at least twice bigger than engines preemption
timeout should allow to finish the test without -ETIME error.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2410
Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
---
 tests/i915/gem_ctx_persistence.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/i915/gem_ctx_persistence.c b/tests/i915/gem_ctx_persistence.c
index a844439de19..36ddca6c231 100644
--- a/tests/i915/gem_ctx_persistence.c
+++ b/tests/i915/gem_ctx_persistence.c
@@ -1176,6 +1176,11 @@ static void many_contexts(int i915, const intel_ctx_cfg_t *cfg)
 	igt_until_timeout(30) {
 		for_each_ctx_cfg_engine(i915, cfg, e) {
 			const intel_ctx_t *ctx;
+			int t = 0;
+
+			gem_engine_property_scanf(i915, e->name,
+						  "preempt_timeout_ms", "%d", &t);
+			timeout = max_t(int64_t, timeout, 2000000ll * t);
 
 			ctx = ctx_create_persistence(i915, cfg, false);
 
-- 
2.34.1



More information about the Intel-gfx-trybot mailing list