summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-02-20 09:35:10 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2019-02-20 14:26:03 +0000
commitee6e006202a50c5aef373c0b075027ed7177935a (patch)
treed409b2ddf34e95320a57f27a6fb2003cc62dd005
parent091cf55736d7df8ee2984b94086e34185b11276f (diff)
i915/gem_ctx_exec: Remember to ask for permission to reset the GPU
norecovery intentionally issues a GPU reset, but we should only do so after confirming with the kernel that this can work. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109691 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
-rw-r--r--tests/i915/gem_ctx_exec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index 78cfe66c..d67d0ec2 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -158,7 +158,10 @@ static bool has_recoverable_param(int i915)
static void norecovery(int i915)
{
+ igt_hang_t hang;
+
igt_require(has_recoverable_param(i915));
+ hang = igt_allow_hang(i915, 0, 0);
for (int pass = 1; pass >= 0; pass--) {
struct drm_i915_gem_context_param param = {
@@ -190,6 +193,8 @@ static void norecovery(int i915)
gem_context_destroy(i915, param.ctx_id);
}
+
+ igt_disallow_hang(i915, hang);
}
igt_main