From: Nirmoy Das Date: Mon, 22 May 2023 12:42:05 +0000 (+0200) Subject: drm/i915: Wait for active retire before i915_active_fini() X-Git-Tag: v6.6.7~1918^2~17^2~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a2280e8dcd2f1f436db9631287c0b21cf6a92b0;p=platform%2Fkernel%2Flinux-starfive.git drm/i915: Wait for active retire before i915_active_fini() i915_active_fini() finalizes the debug object, which can occur before the active retires and deactivates the debug object. Wait for one final time before calling i915_active_fini(); Closes:: https://gitlab.freedesktop.org/drm/intel/-/issues/8311 Signed-off-by: Nirmoy Das Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20230522124205.368-1-nirmoy.das@intel.com --- diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c index 20a4478..bad698b 100644 --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -1710,6 +1710,8 @@ static void release_references(struct i915_vma *vma, struct intel_gt *gt, if (vm_ddestroy) i915_vm_resv_put(vma->vm); + /* Wait for async active retire */ + i915_active_wait(&vma->active); i915_active_fini(&vma->active); GEM_WARN_ON(vma->resource); i915_vma_free(vma);