diff mbox series

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

Message ID 20190905120710.24770-1-janusz.krzysztofik@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series [i-g-t] lib: Don't use full reset on simulated hardware | expand

Commit Message

Janusz Krzysztofik Sept. 5, 2019, 12:07 p.m. UTC
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@linux.intel.com>
---
 lib/drmtest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

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);
 }