intel-gfx.lists.freedesktop.org archive mirror
 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 2/6] drm/i915/selftests: Drop manual request wakerefs around hangcheck
Date: Wed, 26 Jun 2019 16:27:17 +0300	[thread overview]
Message-ID: <875zos5vey.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190626065303.31624-2-chris@chris-wilson.co.uk>

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

> We no longer need to manually acquire a wakeref for request emission, so
> drop the redundant wakerefs, letting us test our wakeref handling more
> precisely.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Riding on the request's ref and getting more fine
grained sounds good.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 7 -------
>  drivers/gpu/drm/i915/gt/selftest_reset.c     | 4 ++--
>  2 files changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> index 0e0b6c572ae9..cf592a049a71 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_hangcheck.c
> @@ -373,7 +373,6 @@ static int igt_reset_nop(void *arg)
>  	struct i915_gem_context *ctx;
>  	unsigned int reset_count, count;
>  	enum intel_engine_id id;
> -	intel_wakeref_t wakeref;
>  	struct drm_file *file;
>  	IGT_TIMEOUT(end_time);
>  	int err = 0;
> @@ -393,7 +392,6 @@ static int igt_reset_nop(void *arg)
>  	}
>  
>  	i915_gem_context_clear_bannable(ctx);
> -	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>  	reset_count = i915_reset_count(&i915->gpu_error);
>  	count = 0;
>  	do {
> @@ -442,8 +440,6 @@ static int igt_reset_nop(void *arg)
>  	err = igt_flush_test(i915, I915_WAIT_LOCKED);
>  	mutex_unlock(&i915->drm.struct_mutex);
>  
> -	intel_runtime_pm_put(&i915->runtime_pm, wakeref);
> -
>  out:
>  	mock_file_free(i915, file);
>  	if (i915_reset_failed(i915))
> @@ -457,7 +453,6 @@ static int igt_reset_nop_engine(void *arg)
>  	struct intel_engine_cs *engine;
>  	struct i915_gem_context *ctx;
>  	enum intel_engine_id id;
> -	intel_wakeref_t wakeref;
>  	struct drm_file *file;
>  	int err = 0;
>  
> @@ -479,7 +474,6 @@ static int igt_reset_nop_engine(void *arg)
>  	}
>  
>  	i915_gem_context_clear_bannable(ctx);
> -	wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>  	for_each_engine(engine, i915, id) {
>  		unsigned int reset_count, reset_engine_count;
>  		unsigned int count;
> @@ -549,7 +543,6 @@ static int igt_reset_nop_engine(void *arg)
>  	err = igt_flush_test(i915, I915_WAIT_LOCKED);
>  	mutex_unlock(&i915->drm.struct_mutex);
>  
> -	intel_runtime_pm_put(&i915->runtime_pm, wakeref);
>  out:
>  	mock_file_free(i915, file);
>  	if (i915_reset_failed(i915))
> diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c
> index 89da9e7cc1ba..64c2c8ab64ec 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_reset.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_reset.c
> @@ -63,8 +63,8 @@ static int igt_atomic_reset(void *arg)
>  
>  	/* Check that the resets are usable from atomic context */
>  
> +	intel_gt_pm_get(&i915->gt);
>  	igt_global_reset_lock(i915);
> -	mutex_lock(&i915->drm.struct_mutex);
>  
>  	/* Flush any requests before we get started and check basics */
>  	if (!igt_force_reset(i915))
> @@ -89,8 +89,8 @@ static int igt_atomic_reset(void *arg)
>  	igt_force_reset(i915);
>  
>  unlock:
> -	mutex_unlock(&i915->drm.struct_mutex);
>  	igt_global_reset_unlock(i915);
> +	intel_gt_pm_put(&i915->gt);
>  
>  	return err;
>  }
> -- 
> 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:27 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 [this message]
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 ` [PATCH 1/6] " Mika Kuoppala
2019-06-26 13:22   ` 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=875zos5vey.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).