From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Disable heartbeat around hang tests
Date: Fri, 31 Jan 2020 15:22:38 +0200 [thread overview]
Message-ID: <87r1zf92w1.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200131130319.2998318-1-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> If the heartbeat fires in the middle of the preempt-hang test, it
> consumes our forced hang disrupting the test.
>
> Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/gt/selftest_lrc.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> index 5e04ecb61dcc..f5214a374fb7 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> @@ -2452,15 +2452,19 @@ static int live_preempt_hang(void *arg)
> I915_USER_PRIORITY(I915_CONTEXT_MIN_USER_PRIORITY);
>
> for_each_engine(engine, gt, id) {
> + unsigned long heartbeat;
> struct i915_request *rq;
>
> if (!intel_engine_has_preemption(engine))
> continue;
>
> + engine_heartbeat_disable(engine, &heartbeat);
> +
> rq = spinner_create_request(&spin_lo, ctx_lo, engine,
> MI_ARB_CHECK);
> if (IS_ERR(rq)) {
> err = PTR_ERR(rq);
> + engine_heartbeat_enable(engine, heartbeat);
Was thinking that you could grab the engine and abuse then the error
path to enable.
But too hairy.
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> goto err_ctx_lo;
> }
>
> @@ -2470,6 +2474,7 @@ static int live_preempt_hang(void *arg)
> GEM_TRACE_DUMP();
> intel_gt_set_wedged(gt);
> err = -EIO;
> + engine_heartbeat_enable(engine, heartbeat);
> goto err_ctx_lo;
> }
>
> @@ -2477,6 +2482,7 @@ static int live_preempt_hang(void *arg)
> MI_ARB_CHECK);
> if (IS_ERR(rq)) {
> igt_spinner_end(&spin_lo);
> + engine_heartbeat_enable(engine, heartbeat);
> err = PTR_ERR(rq);
> goto err_ctx_lo;
> }
> @@ -2491,6 +2497,7 @@ static int live_preempt_hang(void *arg)
> pr_err("Preemption did not occur within timeout!");
> GEM_TRACE_DUMP();
> intel_gt_set_wedged(gt);
> + engine_heartbeat_enable(engine, heartbeat);
> err = -EIO;
> goto err_ctx_lo;
> }
> @@ -2505,12 +2512,15 @@ static int live_preempt_hang(void *arg)
> GEM_TRACE("hi spinner failed to start\n");
> GEM_TRACE_DUMP();
> intel_gt_set_wedged(gt);
> + engine_heartbeat_enable(engine, heartbeat);
> err = -EIO;
> goto err_ctx_lo;
> }
>
> igt_spinner_end(&spin_hi);
> igt_spinner_end(&spin_lo);
> + engine_heartbeat_enable(engine, heartbeat);
> +
> if (igt_flush_test(gt->i915)) {
> err = -EIO;
> goto err_ctx_lo;
> --
> 2.25.0
>
> _______________________________________________
> 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:[~2020-01-31 13:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 13:03 [Intel-gfx] [PATCH] drm/i915/selftests: Disable heartbeat around hang tests Chris Wilson
2020-01-31 13:22 ` Mika Kuoppala [this message]
2020-01-31 13:31 ` Chris Wilson
2020-01-31 19:09 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " 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=87r1zf92w1.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--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.