OSDN Git Service

drm/i915/selftests: Skip live_execlists if the GPU is terminally wedged
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Jul 2018 11:45:10 +0000 (12:45 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Jul 2018 13:05:23 +0000 (14:05 +0100)
If the GPU is irrecoverably wedged, we can not execute any requests
making testing execlists (request execution) pointless. Skip!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180706114510.18467-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/intel_lrc.c

index ea27c7c..730a02d 100644 (file)
@@ -455,5 +455,8 @@ int intel_execlists_live_selftests(struct drm_i915_private *i915)
        if (!HAS_EXECLISTS(i915))
                return 0;
 
+       if (i915_terminally_wedged(&i915->gpu_error))
+               return 0;
+
        return i915_subtests(tests, i915);
 }