From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/selftests: Improve error detection of reset failure
Date: Tue, 12 Mar 2019 14:33:37 +0200 [thread overview]
Message-ID: <877ed4tgpq.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190312111146.10662-2-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Use a timedwait to promptly detect if the recovery after reset fails and
> provide a meaningful debug dump.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> .../gpu/drm/i915/selftests/intel_hangcheck.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> index 10658ad05305..b5e35b2a925f 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> @@ -983,7 +983,23 @@ static int __igt_reset_engines(struct drm_i915_private *i915,
> count++;
>
> if (rq) {
> - i915_request_wait(rq, 0, MAX_SCHEDULE_TIMEOUT);
> + if (i915_request_wait(rq, 0, HZ / 5) < 0) {
> + struct drm_printer p =
> + drm_info_printer(i915->drm.dev);
> +
> + pr_err("i915_reset_engine(%s:%s):"
> + " failed to complete request after reset\n",
> + engine->name, test_name);
> + intel_engine_dump(engine, &p,
> + "%s\n", engine->name);
> + i915_request_put(rq);
> +
> + GEM_TRACE_DUMP();
Would this be useful also in above, where we wait until request
is running?
> + i915_gem_set_wedged(i915);
> + err = -EIO;
Moving the *rq out from loop and then doing if(rq) i915_request_put(rq);
out loop after exit, might be easier on error handling, shrug.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> + break;
> + }
> +
> i915_request_put(rq);
> }
>
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-12 12:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 11:11 [PATCH 1/2] drm/i915: Consolidate reset-request debug message Chris Wilson
2019-03-12 11:11 ` [PATCH 2/2] drm/i915/selftests: Improve error detection of reset failure Chris Wilson
2019-03-12 12:33 ` Mika Kuoppala [this message]
2019-03-12 12:43 ` Chris Wilson
2019-03-12 11:53 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Consolidate reset-request debug message Patchwork
2019-03-12 12:23 ` [PATCH 1/2] " Mika Kuoppala
2019-03-12 12:27 ` Chris Wilson
2019-03-12 14:43 ` ✓ Fi.CI.IGT: success for series starting with [1/2] " 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=877ed4tgpq.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.