[PATCH i-g-t] lib/i915: Restore hangcheck modparams between tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The hangcheck/reset modparam has far reaching effects and disables
functionality if switch off. This can surprise a few tests causing them
to skip.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/1929
Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 lib/i915/gem.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/i915/gem.c b/lib/i915/gem.c
index 3ef31ed33..45db8a0fd 100644
--- a/lib/i915/gem.c
+++ b/lib/i915/gem.c
@@ -130,6 +130,13 @@ static void reset_device(int i915)
 	close(dir);
 }
 
+static void restore_params(int i915)
+{
+	/* Re-enable modparams if left clobbered */
+	igt_params_set(i915, "reset", "%u", -1);
+	igt_params_set(i915, "enable_hangcheck", "%u", 1);
+}
+
 void igt_require_gem(int i915)
 {
 	int err;
@@ -150,6 +157,7 @@ void igt_require_gem(int i915)
 	 * sequences of batches.
 	 */
 	reset_device(i915);
+	restore_params(i915);
 	restore_defaults(i915);
 
 	err = 0;
-- 
2.27.0.rc0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux