[PATCH 3/3] drm/i915/gt: Clear wedged status upon suspend
Nirmoy Das
nirmoy.das at intel.com
Mon Jan 30 16:36:22 UTC 2023
From: Chris Wilson <chris.p.wilson at linux.intel.com>
Currently we use set-wedged on suspend if the workload is not responding
in order to allow a fast suspend (albeit at the cost of discarding the
current userspace). This may leave the device wedged during suspend,
where we may require the device available in order to swapout CPU
inaccessible device memory. Clear any temporary wedged-status after
flushing userspace off the device so we can use the blitter ourselves
inside suspend.
Testcase: igt/gem_eio/in-flight-suspend
Signed-off-by: Chris Wilson <chris.p.wilson at linux.intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_pm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
index cef3d6f5c34e..74d1dd3793f9 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c
@@ -317,19 +317,17 @@ int intel_gt_resume(struct intel_gt *gt)
static void wait_for_suspend(struct intel_gt *gt)
{
- if (!intel_gt_pm_is_awake(gt))
- return;
-
- if (intel_gt_wait_for_idle(gt, I915_GT_SUSPEND_IDLE_TIMEOUT) == -ETIME) {
+ if (intel_gt_wait_for_idle(gt, I915_GT_SUSPEND_IDLE_TIMEOUT) == -ETIME)
/*
* Forcibly cancel outstanding work and leave
* the gpu quiet.
*/
intel_gt_set_wedged(gt);
- intel_gt_retire_requests(gt);
- }
intel_gt_pm_wait_for_idle(gt);
+
+ /* Make the GPU available again for swapout */
+ intel_gt_unset_wedged(gt);
}
void intel_gt_suspend_prepare(struct intel_gt *gt)
--
2.39.0
More information about the Intel-gfx-trybot
mailing list