diff mbox

drm/i915/selftests: Skip live_execlists if the GPU is terminally wedged

Message ID 20180706114510.18467-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson July 6, 2018, 11:45 a.m. UTC
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>
---
 drivers/gpu/drm/i915/selftests/intel_lrc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Matthew Auld July 6, 2018, 12:08 p.m. UTC | #1
On 6 July 2018 at 12:45, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> 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>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/selftests/intel_lrc.c b/drivers/gpu/drm/i915/selftests/intel_lrc.c
index ea27c7cfbf96..730a02d39058 100644
--- a/drivers/gpu/drm/i915/selftests/intel_lrc.c
+++ b/drivers/gpu/drm/i915/selftests/intel_lrc.c
@@ -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);
 }