Commit f81ff31c authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/selftests: Terminate hangcheck sanitycheck forcibly



If all else fails and we are stuck eternally waiting for the undying
request, abandon all hope.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181203113701.12106-6-chris@chris-wilson.co.uk
parent f36c071f
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -308,6 +308,7 @@ static int igt_hang_sanitycheck(void *arg)
		goto unlock;

	for_each_engine(engine, i915, id) {
		struct igt_wedge_me w;
		long timeout;

		if (!intel_engine_can_store_dword(engine))
@@ -328,9 +329,14 @@ static int igt_hang_sanitycheck(void *arg)

		i915_request_add(rq);

		timeout = 0;
		igt_wedge_on_timeout(&w, i915, HZ / 10 /* 100ms timeout*/)
			timeout = i915_request_wait(rq,
						    I915_WAIT_LOCKED,
						    MAX_SCHEDULE_TIMEOUT);
		if (i915_terminally_wedged(&i915->gpu_error))
			timeout = -EIO;

		i915_request_put(rq);

		if (timeout < 0) {