From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Andi Shyti <andi.shyti@intel.com>, dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 2/4] drm/i915: Make GEM resume all engines
Date: Thu, 15 Sep 2022 16:26:52 -0700 [thread overview]
Message-ID: <20220915232654.3283095-3-matthew.d.roper@intel.com> (raw)
In-Reply-To: <20220915232654.3283095-1-matthew.d.roper@intel.com>
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>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
---
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
next prev parent reply other threads:[~2022-09-15 23:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-15 23:26 [Intel-gfx] [PATCH v2 0/4] Further multi-gt handling Matt Roper
2022-09-15 23:26 ` [Intel-gfx] [PATCH v2 1/4] drm/i915/gt: Cleanup partial engine discovery failures Matt Roper
2022-09-16 8:03 ` Janusz Krzysztofik
2022-09-15 23:26 ` Matt Roper [this message]
2022-09-15 23:26 ` [Intel-gfx] [PATCH v2 3/4] drm/i915: Make GEM suspend all GTs Matt Roper
2022-09-15 23:26 ` [Intel-gfx] [PATCH v2 4/4] drm/i915: Handle all GTs on driver (un)load paths Matt Roper
2022-09-16 8:19 ` Andi Shyti
2022-09-15 23:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Further multi-gt handling (rev2) Patchwork
2022-09-16 0:08 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-16 6:38 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-09-16 15:04 ` Matt Roper
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=20220915232654.3283095-3-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=andi.shyti@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--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