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 3/4] drm/i915/selftests: Hold the rpm/forcewake wakeref for the reset tests
Date: Mon, 09 Oct 2017 13:14:44 +0300	[thread overview]
Message-ID: <87vajozkyz.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20171009093256.13996-3-chris@chris-wilson.co.uk>

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

> Resetting the engine requires us to hold the forcewake wakeref to
> prevent RC6 trying to happen in the middle of the reset sequence.
> Normally, this is taken by i915_handle_error(), but as we are calling

There is no explicit forcewake grab on i915_handle_error().
What I am missing in here?

-Mika


> the lowlevel functions ourselves, we need to hold it. Wrap the entire
> live_hangcheck set of subtests in a single forcewake section for
> simplicity.
>
> This greatly improves the reliability of drv_selftest/live_hangcheck on
> Haswell, where it would exhibit an inability to restart a request
> because it lost its PD registers (PD_DIR_BASE reported as 0).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/selftests/intel_hangcheck.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> index 7e1bdd88eda3..a9e0decccc1f 100644
> --- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> +++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
> @@ -878,9 +878,18 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
>  		SUBTEST(igt_reset_queue),
>  		SUBTEST(igt_handle_error),
>  	};
> +	int err;
>  
>  	if (!intel_has_gpu_reset(i915))
>  		return 0;
>  
> -	return i915_subtests(tests, i915);
> +	intel_runtime_pm_get(i915);
> +	intel_uncore_forcewake_get(i915, FORCEWAKE_ALL);
> +
> +	err = i915_subtests(tests, i915);
> +
> +	intel_uncore_forcewake_put(i915, FORCEWAKE_ALL);
> +	intel_runtime_pm_put(i915);
> +
> +	return err;
>  }
> -- 
> 2.14.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-09 10:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09  9:32 [PATCH 1/4] drm/i915: Make i915_engine_info pretty printer to standalone Chris Wilson
2017-10-09  9:32 ` [PATCH 2/4] drm/i915/selftests: Pretty print engine state when requests fail to start Chris Wilson
2017-10-09  9:32 ` [PATCH 3/4] drm/i915/selftests: Hold the rpm/forcewake wakeref for the reset tests Chris Wilson
2017-10-09 10:14   ` Mika Kuoppala [this message]
2017-10-09 10:28     ` Chris Wilson
2017-10-09  9:32 ` [PATCH 4/4] drm/i915: Provide an assert for when we expect forcewake to be held Chris Wilson
2017-10-09 10:05   ` Mika Kuoppala
2017-10-09 10:14     ` Chris Wilson
2017-10-09 10:24   ` [PATCH v2] " Chris Wilson
2017-10-09 10:22 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/i915: Make i915_engine_info pretty printer to standalone Patchwork
2017-10-09 12:01 ` ✗ Fi.CI.BAT: warning for series starting with [1/4] drm/i915: Make i915_engine_info pretty printer to standalone (rev2) 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=87vajozkyz.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.