From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/7] drm/i915/selftests: Terminate hangcheck sanitycheck forcibly
Date: Sat, 1 Dec 2018 09:52:28 +0000 [thread overview]
Message-ID: <20181201095231.324-4-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20181201095231.324-1-chris@chris-wilson.co.uk>
If all else fails and we are stuck eternally waiting for the undying
request, abandon all hope.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index defe671130ab..a48fbe2557ea 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -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 = i915_request_wait(rq,
- I915_WAIT_LOCKED,
- MAX_SCHEDULE_TIMEOUT);
+ 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) {
--
2.20.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-12-01 9:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 9:52 [PATCH 1/7] drm/i915: Complete the fences as they are cancelled due to wedging Chris Wilson
2018-12-01 9:52 ` [PATCH 2/7] drm/i915/ringbuffer: Clear semaphore sync registers on ring init Chris Wilson
2018-12-01 9:52 ` [PATCH 3/7] drm/i915: Allocate a common scratch page Chris Wilson
2018-12-01 9:52 ` Chris Wilson [this message]
2018-12-01 9:52 ` [PATCH 5/7] drm/i915/selftests: Reorder request allocation vs vma pinning Chris Wilson
2018-12-01 9:52 ` [PATCH 6/7] drm/i915: Pipeline PDP updates for Braswell Chris Wilson
2018-12-01 9:52 ` [PATCH 7/7] drm/i915/execlists: Apply a full mb before execution " Chris Wilson
2018-12-01 18:32 ` Chris Wilson
2018-12-01 10:00 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] drm/i915: Complete the fences as they are cancelled due to wedging Patchwork
2018-12-01 10:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-01 10:21 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-01 20:34 ` ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181201095231.324-4-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox