summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-15 11:42:17 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-19 21:01:29 +0000
commit092273f6b66c301f12efcb49f54d667c46ad6592 (patch)
tree32aa2f54a3a3cfbe4c9ff3c3c6b03512e52d92e3
parentedf2930cb55f3d1bfa135ee890919f9d69b0f754 (diff)
lib: Restore the i915.reset modparam before cleaning up
We force a reset on test exit so that we can rapidly cleanup after a naughty test, it is not unknown for us to leave a queue of hanging batches around. However, if we have also fiddled with the i915.reset parameter in the meantime, this can leave the kernel unable to fulfil our request (and those naughty batches continue to disrupt testing). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com>
-rw-r--r--lib/drmtest.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 1964795a..6c0a0e38 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -54,6 +54,7 @@
#include "igt_device.h"
#include "igt_gt.h"
#include "igt_kmod.h"
+#include "igt_sysfs.h"
#include "version.h"
#include "config.h"
#include "intel_reg.h"
@@ -345,6 +346,7 @@ static void __cancel_work_at_exit(int fd)
{
igt_terminate_spin_batches(); /* for older kernels */
+ igt_sysfs_set_parameter(fd, "reset", "%x", -1u /* any method */);
igt_drop_caches_set(fd,
/* cancel everything */
DROP_RESET_ACTIVE | DROP_RESET_SEQNO |