All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/6] drm/i915/selftests: Serialise nop reset with retirement
Date: Wed, 26 Jun 2019 16:11:49 +0300	[thread overview]
Message-ID: <878sto5w4q.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190626065303.31624-1-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> In order for the reset count to be accurate across our selftest, we need
> to prevent the background retire worker from modifying our expected
> state.
>

Ok, to summarize the irc discussion we had: The above holds true
for igt_reset_engine_nop only. As there is no race in
global reset path...currently.

But there is intent towards symmetry on both paths
so it makes sense to keep the tests aligned.

The commit msg could be enhanced on this regard.

Also while looking through this, we do increase
the reset_count rather early before the failpaths.
even with the resets disabled it gets incremented.
So now it is more of a attempted reset count.

But that is not a topic for this patch so,
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> index 3ceb397c8645..0e0b6c572ae9 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> @@ -398,6 +398,7 @@ static int igt_reset_nop(void *arg)
>  	count = 0;
>  	do {
>  		mutex_lock(&i915->drm.struct_mutex);
> +
>  		for_each_engine(engine, i915, id) {
>  			int i;
>  
> @@ -413,11 +414,12 @@ static int igt_reset_nop(void *arg)
>  				i915_request_add(rq);
>  			}
>  		}
> -		mutex_unlock(&i915->drm.struct_mutex);
>  
>  		igt_global_reset_lock(i915);
>  		i915_reset(i915, ALL_ENGINES, NULL);
>  		igt_global_reset_unlock(i915);
> +
> +		mutex_unlock(&i915->drm.struct_mutex);
>  		if (i915_reset_failed(i915)) {
>  			err = -EIO;
>  			break;
> @@ -511,9 +513,8 @@ static int igt_reset_nop_engine(void *arg)
>  
>  				i915_request_add(rq);
>  			}
> -			mutex_unlock(&i915->drm.struct_mutex);
> -
>  			err = i915_reset_engine(engine, NULL);
> +			mutex_unlock(&i915->drm.struct_mutex);
>  			if (err) {
>  				pr_err("i915_reset_engine failed\n");
>  				break;
> -- 
> 2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-06-26 13:12 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26  6:52 [PATCH 1/6] drm/i915/selftests: Serialise nop reset with retirement Chris Wilson
2019-06-26  6:52 ` [PATCH 2/6] drm/i915/selftests: Drop manual request wakerefs around hangcheck Chris Wilson
2019-06-26 13:19   ` Chris Wilson
2019-06-26 13:27   ` Mika Kuoppala
2019-06-26  6:53 ` [PATCH 3/6] drm/i915/selftests: Fixup atomic reset checking Chris Wilson
2019-06-26 13:35   ` Mika Kuoppala
2019-06-26 13:39     ` Chris Wilson
2019-06-26 13:43       ` Mika Kuoppala
2019-06-26  6:53 ` [PATCH 4/6] drm/i915: Add a wakeref getter for iff the wakeref is already active Chris Wilson
2019-06-26 13:43   ` Mika Kuoppala
2019-06-26 13:46     ` Chris Wilson
2019-06-26 14:37       ` Mika Kuoppala
2019-06-26  6:53 ` [PATCH 5/6] drm/i915: Only recover active engines Chris Wilson
2019-06-26 14:44   ` Mika Kuoppala
2019-06-26 14:47     ` Chris Wilson
2019-06-26  6:53 ` [PATCH 6/6] drm/i915: Lift intel_engines_resume() to callers Chris Wilson
2019-06-26  8:20 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm/i915/selftests: Serialise nop reset with retirement Patchwork
2019-06-26  9:35 ` ✓ Fi.CI.BAT: success " Patchwork
2019-06-26 13:11 ` Mika Kuoppala [this message]
2019-06-26 13:22   ` [PATCH 1/6] " Chris Wilson
2019-06-26 15:32 ` ✓ Fi.CI.IGT: success for series starting with [1/6] " 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=878sto5w4q.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.