summaryrefslogtreecommitdiff
path: root/tests/intel/gem_watchdog.c
diff options
context:
space:
mode:
authorJohn Harrison <John.C.Harrison@Intel.com>2024-02-12 13:23:28 -0800
committerAshutosh Dixit <ashutosh.dixit@intel.com>2024-02-22 14:44:38 -0800
commit779ee585dd275969f2f6da7089f62ba1c01373d7 (patch)
tree2e7f8a6d9894b44f915ffd8e7f3c217211fd3ef0 /tests/intel/gem_watchdog.c
parent30a3361a3deebb74c87c3756e0660a65597e950b (diff)
tests/intel/gem_watchdog: Reduced timeouts for worst case scenario
The watchdog test reduces the watchdog timer from 20s to 1s and then uses a 5s timeout waiting for the watchdog to do its stuff. This works fine in general, but if an engine reset is required by a context that is actually dead for real then a pre-emption timeout must be factored in. For RCS/CCS engines, that timeout is 7.5 seconds by default. Thus, the test timeout expires first and the test fails. Normally, the system is not so dead when running this test as to require an engine reset. A simple pre-emption works fine for the spinner contexts that is uses. However, there is a hardware workaround coming which prevents context switches when both RCS and CCS are busy. So add an explicit override of the pre-emption timeout as well as the watchdog timeout. That will allow the test to keep working after the new w/a lands. Signed-off-by: John Harrison <John.C.Harrison@Intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/intel/gem_watchdog.c')
-rw-r--r--tests/intel/gem_watchdog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/intel/gem_watchdog.c b/tests/intel/gem_watchdog.c
index 1e4c35021..c9dd0deb5 100644
--- a/tests/intel/gem_watchdog.c
+++ b/tests/intel/gem_watchdog.c
@@ -577,6 +577,16 @@ igt_main
i915 = drm_reopen_driver(i915); /* Apply modparam. */
ctx = intel_ctx_create_all_physical(i915);
+
+ for_each_ctx_engine(i915, ctx, e) {
+ /*
+ * Context termination by watchdog may require an engine reset. That only
+ * occurs after a pre-emption attempt has expired. For RCS/CCS engines,
+ * the pre-emption timeout is longer than this test is wanting to wait.
+ * So reduce that timeout in addition to the watchdog timeout itself.
+ */
+ gem_engine_property_printf(i915, e->name, "preempt_timeout_ms", "%d", 640);
+ }
}
igt_subtest_group {