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
Cc: stable@kernel.org, Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Force the GT reset on shutdown
Date: Tue, 26 May 2020 12:10:35 +0300	[thread overview]
Message-ID: <87a71vt62c.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200525151459.12083-1-chris@chris-wilson.co.uk>

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

> Before we return control to the system, and letting it reuse all the
> pages being accessed by HW, we must disable the HW. At the moment, we
> dare not reset the GPU if it will clobber the display, but once we know
> the display has been disabled, we can proceed with the reset as we
> shutdown the module. We know the next user must reinitialise the HW for
> their purpose.
>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/489
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: stable@kernel.org

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_gt.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index f069551e412f..ebc29b6ee86c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -616,6 +616,11 @@ void intel_gt_driver_unregister(struct intel_gt *gt)
>  void intel_gt_driver_release(struct intel_gt *gt)
>  {
>  	struct i915_address_space *vm;
> +	intel_wakeref_t wakeref;
> +
> +	/* Scrub all HW state upon release */
> +	with_intel_runtime_pm(gt->uncore->rpm, wakeref)
> +		__intel_gt_reset(gt, ALL_ENGINES);
>  
>  	vm = fetch_and_zero(&gt->vm);
>  	if (vm) /* FIXME being called twice on error paths :( */
> -- 
> 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

  reply	other threads:[~2020-05-26  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-25 12:04 [Intel-gfx] [PATCH] drm/i915/gt: Force the GT reset on shutdown Chris Wilson
2020-05-25 14:05 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-05-25 14:17 ` [Intel-gfx] [PATCH] " Chris Wilson
2020-05-25 15:03 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Force the GT reset on shutdown (rev2) Patchwork
2020-05-25 15:14 ` [Intel-gfx] [PATCH] drm/i915/gt: Force the GT reset on shutdown Chris Wilson
2020-05-26  9:10   ` Mika Kuoppala [this message]
2020-05-25 16:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Force the GT reset on shutdown (rev3) Patchwork
2020-05-25 20:18 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=87a71vt62c.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@kernel.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.