[PATCH i-g-t 5/6] tests/i915/gem_exec_capture: Disable hangcheck and watchdog

Thomas Hellström thomas.hellstrom at linux.intel.com
Sun Oct 24 17:16:40 UTC 2021


Disable hangcheck and set the watchdog timeout to something very
large in order to not have them interfere with the capturing. In
particular, hangcheck may start a parallell capture consuming
memory not accounted for, and more importantly, when the first
capture retires the hung request, the capture initiated by
hancheck will dereference freed memory. (This latter also needs
fixing in there kernel module).
The watchdog doesn't initiate an error capture but appears to end
up spinning waiting to do an engine reset.

Signed-off-by: Thomas Hellström <thomas.hellstrom at linux.intel.com>
---
 tests/i915/gem_exec_capture.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/tests/i915/gem_exec_capture.c b/tests/i915/gem_exec_capture.c
index 875e0b7b..b2f9dd13 100644
--- a/tests/i915/gem_exec_capture.c
+++ b/tests/i915/gem_exec_capture.c
@@ -697,6 +697,7 @@ igt_main
 
 	igt_fixture {
 		int gen;
+		char *tmp;
 
 		fd = drm_open_driver(DRIVER_INTEL);
 
@@ -704,6 +705,20 @@ igt_main
 		if (gen > 3 && gen < 6) /* ctg and ilk need secure batches */
 			igt_device_set_master(fd);
 
+		/*
+		 * Avoid having watchdog and hangcheck interfere with the
+		 * capture.
+		 */
+		tmp = __igt_params_get(fd, "request_timeout_ms");
+		if (tmp && atoi(tmp))
+			igt_params_save_and_set(fd, "request_timeout_ms", "%u",
+						20000000);
+
+		tmp = __igt_params_get(fd, "enable_hangcheck");
+		if (tmp && atoi(tmp))
+			igt_params_save_and_set(fd, "enable_hangcheck", "%u",
+						0);
+
 		igt_require_gem(fd);
 		gem_require_mmap_device_coherent(fd);
 		igt_require(has_capture(fd));
-- 
2.31.1



More information about the Intel-gfx-trybot mailing list