[igt-dev] [PATCH i-g-t] lib: Don't use full reset on simulated hardware

Janusz Krzysztofik janusz.krzysztofik at linux.intel.com
Thu Sep 5 12:07:10 UTC 2019


If DROP_RESET_ACTIVE is requested while there is a large queue of pending
GEM requests, waiting for idle engines performed as a first step of
i915_gem_drop_caches debugfs request handler times out and an otherwise
healthy device is marked wedged.  If that happens while reset capabilities
are disabled or not supported, there is no possibility to successfully
reset the device after requests are retired.

Avoid fake GPU terminally wedged conditions by not requesting
DROP_RESET_ACTIVE from exit handler when running on simulated hardware.
As a side effect, terminating a very busy test and running a subsequent
one may take quite a while.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
 lib/drmtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index c379a7b7..b73bc132 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -318,7 +318,8 @@ static void __cancel_work_at_exit(int fd)
 	igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */);
 	igt_drop_caches_set(fd,
 			    /* cancel everything */
-			    DROP_RESET_ACTIVE | DROP_RESET_SEQNO |
+			    igt_run_in_simulation() ? 0 : DROP_RESET_ACTIVE |
+			    DROP_RESET_SEQNO |
 			    /* cleanup */
 			    DROP_ACTIVE | DROP_RETIRE | DROP_IDLE | DROP_FREED);
 }
-- 
2.21.0



More information about the igt-dev mailing list