All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/4] drm/i915: Make GEM resume all engines
Date: Thu, 15 Sep 2022 23:34:05 +0200	[thread overview]
Message-ID: <YyOaTZdCkKTqniRR@alfio.lan> (raw)
In-Reply-To: <20220914220427.3091448-3-matthew.d.roper@intel.com>

Hi Matt,

On Wed, Sep 14, 2022 at 03:04:25PM -0700, Matt Roper wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Walk all GTs from i915_gem_resume when resuming engines.
> 
> Cc: Andi Shyti <andi.shyti@intel.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>

I had this (and others) in my multi-gt branch from a long time
but never had time to clean it up and send it. Thanks for taking
it.

Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>

Thanks,
Andi

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_pm.c | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> index 3428f735e786..2c80cc8362b6 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> @@ -212,7 +212,8 @@ int i915_gem_freeze_late(struct drm_i915_private *i915)
>  
>  void i915_gem_resume(struct drm_i915_private *i915)
>  {
> -	int ret;
> +	struct intel_gt *gt;
> +	int ret, i, j;
>  
>  	GEM_TRACE("%s\n", dev_name(i915->drm.dev));
>  
> @@ -224,8 +225,25 @@ void i915_gem_resume(struct drm_i915_private *i915)
>  	 * guarantee that the context image is complete. So let's just reset
>  	 * it and start again.
>  	 */
> -	intel_gt_resume(to_gt(i915));
> +	for_each_gt(gt, i915, i)
> +		if (intel_gt_resume(gt))
> +			goto err_wedged;
>  
>  	ret = lmem_restore(i915, I915_TTM_BACKUP_ALLOW_GPU);
>  	GEM_WARN_ON(ret);
> +
> +	return;
> +
> +err_wedged:
> +	for_each_gt(gt, i915, j) {
> +		if (!intel_gt_is_wedged(gt)) {
> +			dev_err(i915->drm.dev,
> +				"Failed to re-initialize GPU[%u], declaring it wedged!\n",
> +				j);
> +			intel_gt_set_wedged(gt);
> +		}
> +
> +		if (j == i)
> +			break;
> +	}
>  }
> -- 
> 2.37.3

  reply	other threads:[~2022-09-15 21:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 22:04 [Intel-gfx] [PATCH 0/4] Further multi-gt handling Matt Roper
2022-09-14 22:04 ` Matt Roper
2022-09-14 22:04 ` [Intel-gfx] [PATCH 1/4] drm/i915/gt: Cleanup partial engine discovery failures Matt Roper
2022-09-14 22:04   ` Matt Roper
2022-09-15 10:40   ` [Intel-gfx] " Janusz Krzysztofik
2022-09-15 10:40     ` Janusz Krzysztofik
2022-09-14 22:04 ` [Intel-gfx] [PATCH 2/4] drm/i915: Make GEM resume all engines Matt Roper
2022-09-14 22:04   ` Matt Roper
2022-09-15 21:34   ` Andi Shyti [this message]
2022-09-14 22:04 ` [Intel-gfx] [PATCH 3/4] drm/i915: Make GEM suspend all GTs Matt Roper
2022-09-14 22:04   ` Matt Roper
2022-09-15 21:36   ` [Intel-gfx] " Andi Shyti
2022-09-14 22:04 ` [Intel-gfx] [PATCH 4/4] drm/i915: Handle all GTs on driver (un)load paths Matt Roper
2022-09-14 22:04   ` Matt Roper
2022-09-15  1:01   ` [Intel-gfx] " Ceraolo Spurio, Daniele
2022-09-15  1:01     ` Ceraolo Spurio, Daniele
2022-09-15  2:18 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Further multi-gt handling Patchwork
2022-09-15  2:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-15 12:25 ` [Intel-gfx] [PATCH 0/4] " Jani Nikula
2022-09-15 21:41   ` Andi Shyti
2022-09-15 23:29   ` Matt Roper
2022-09-15 19:15 ` [Intel-gfx] ✗ Fi.CI.IGT: 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=YyOaTZdCkKTqniRR@alfio.lan \
    --to=andi.shyti@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.com \
    /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.