From: Matt Roper <matthew.d.roper@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 3/4] drm/i915: Make GEM suspend all GTs
Date: Thu, 15 Sep 2022 16:26:53 -0700 [thread overview]
Message-ID: <20220915232654.3283095-4-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 when suspending.
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 | 11 +++++++++--
1 file changed, 9 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 2c80cc8362b6..e5bfb6be9f7a 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
@@ -22,6 +22,9 @@
void i915_gem_suspend(struct drm_i915_private *i915)
{
+ struct intel_gt *gt;
+ unsigned int i;
+
GEM_TRACE("%s\n", dev_name(i915->drm.dev));
intel_wakeref_auto(&to_gt(i915)->userfault_wakeref, 0);
@@ -36,7 +39,8 @@ void i915_gem_suspend(struct drm_i915_private *i915)
* state. Fortunately, the kernel_context is disposable and we do
* not rely on its state.
*/
- intel_gt_suspend_prepare(to_gt(i915));
+ for_each_gt(gt, i915, i)
+ intel_gt_suspend_prepare(gt);
i915_gem_drain_freed_objects(i915);
}
@@ -131,7 +135,9 @@ void i915_gem_suspend_late(struct drm_i915_private *i915)
&i915->mm.purge_list,
NULL
}, **phase;
+ struct intel_gt *gt;
unsigned long flags;
+ unsigned int i;
bool flush = false;
/*
@@ -154,7 +160,8 @@ void i915_gem_suspend_late(struct drm_i915_private *i915)
* machine in an unusable condition.
*/
- intel_gt_suspend_late(to_gt(i915));
+ for_each_gt(gt, i915, i)
+ intel_gt_suspend_late(gt);
spin_lock_irqsave(&i915->mm.obj_lock, flags);
for (phase = phases; *phase; phase++) {
--
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 ` [Intel-gfx] [PATCH v2 2/4] drm/i915: Make GEM resume all engines Matt Roper
2022-09-15 23:26 ` Matt Roper [this message]
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-4-matthew.d.roper@intel.com \
--to=matthew.d.roper@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