diff mbox series

[2/2,RFC] drm/i915: Unbind the vma in suspend if it was bound

Message ID 20241125062804.412536-2-vidya.srinivas@intel.com (mailing list archive)
State New
Headers show
Series [1/2] Revert "drm/i915/dpt: Make DPT object unshrinkable" | expand

Commit Message

Vidya Srinivas Nov. 25, 2024, 6:28 a.m. UTC
In i915_ggtt_suspend_vm, if the vma was bound, the path
to unbind/evict is not hitting during suspend. This is
causing issues with DPT where DPT gets shrunk but the
framebuffer is still on the DPT's bound list. This
causes system reboot in some scenarios of suspend/resume
where it tries to rewrite the PTEs via a stale mapping.

Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_ggtt.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index d60a6ca0cae5..8499aa12a787 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -157,13 +157,11 @@  void i915_ggtt_suspend_vm(struct i915_address_space *vm)
 			goto retry;
 		}
 
-		if (!i915_vma_is_bound(vma, I915_VMA_GLOBAL_BIND)) {
+		if (!i915_vma_is_bound(vma, I915_VMA_GLOBAL_BIND))
 			i915_vma_wait_for_bind(vma);
 
-			__i915_vma_evict(vma, false);
-			drm_mm_remove_node(&vma->node);
-		}
-
+		__i915_vma_evict(vma, false);
+		drm_mm_remove_node(&vma->node);
 		i915_gem_object_unlock(obj);
 	}