[PATCH i-g-t 2/2] lib: Add test child safe support to cancel work at exit
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Fri Jun 7 10:17:03 UTC 2019
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
lib/drmtest.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 25f20353..106015d3 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -320,6 +320,11 @@ static int at_exit_drm_render_fd = -1;
static void __cancel_work_at_exit(int fd)
{
+ if (test_child) {
+ gem_quiescent_gpu(fd);
+ return;
+ }
+
igt_terminate_spins(); /* for older kernels */
igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */);
@@ -404,6 +409,7 @@ int drm_open_driver(int chipset)
at_exit_drm_fd = __drm_open_driver(chipset);
igt_install_exit_handler(cancel_work_at_exit);
+ igt_set_exit_handler_child_safe(cancel_work_at_exit);
}
}
--
2.21.0
More information about the Intel-gfx-trybot
mailing list