[Intel-gfx] [PATCH] drm/i915: Flush the i915_vm_release before ggtt shutdown

Chris Wilson chris at chris-wilson.co.uk
Mon Jul 29 13:12:37 UTC 2019


As the gen6_ppgtt may refer back to the GGTT for their page-directory
slots, make sure those __i915_vm_release are completed prior to shutting
down the GGTT.

Fixes: b32fa8111563 ("drm/i915/gtt: Defer address space cleanup to an RCU worker")
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 drivers/gpu/drm/i915/i915_gem_gtt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index 4dd1fa956143..35d4e99e7abd 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -2720,6 +2720,7 @@ static void ggtt_cleanup_hw(struct i915_ggtt *ggtt)
 	struct i915_vma *vma, *vn;
 
 	ggtt->vm.closed = true;
+	flush_workqueue(i915->wq); /* flush the __i915_vm_release */
 
 	mutex_lock(&i915->drm.struct_mutex);
 
-- 
2.22.0



More information about the Intel-gfx mailing list