diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-26 14:23:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-05-26 21:15:40 +0100 |
commit | f7e3772175c53f0c910f4513831791cb5bdcab04 (patch) | |
tree | bb148a27913d85d7d6e6818431cf3f30adf69ac6 /lib | |
parent | cc5f9f1a4f630c7b7f8bbdc835d21181551012fb (diff) |
lib/i915: Restore hangcheck modparams between tests
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@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/i915/gem.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; |