summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
diff options
context:
space:
mode:
authorChris Wilson2018-07-05 17:02:14 +0200
committerChris Wilson2018-07-06 08:39:30 +0200
commitc4e4f4545bdc3939ae9fff1da55ed1e28776dafe (patch)
tree7c02dfe7dbb84d4686fa0515243e4e24ea56abf7 /drivers/gpu/drm/i915/selftests/intel_hangcheck.c
parentdrm/i915/selftests: Detect unknown swizzling correctly (diff)
downloadkernel-qcow2-linux-c4e4f4545bdc3939ae9fff1da55ed1e28776dafe.tar.gz
kernel-qcow2-linux-c4e4f4545bdc3939ae9fff1da55ed1e28776dafe.tar.xz
kernel-qcow2-linux-c4e4f4545bdc3939ae9fff1da55ed1e28776dafe.zip
drm/i915/selftests: Fail hangcheck testing if the GPU is wedged
If the GPU is irrecoverably wedged on startup, it means that it failed on initialisation and we have already tried to reset it but failed. We can ignore all further testing, as it is already dead. Failing early, prevents us from slowly failing in our endeavours later and timing out. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180705150214.28316-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/intel_hangcheck.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/intel_hangcheck.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index 72547aa24538..5cb808dc5b50 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -1243,6 +1243,9 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
if (!intel_has_gpu_reset(i915))
return 0;
+ if (i915_terminally_wedged(&i915->gpu_error))
+ return -EIO; /* we're long past hope of a successful reset */
+
intel_runtime_pm_get(i915);
saved_hangcheck = fetch_and_zero(&i915_modparams.enable_hangcheck);