drm/xe: Call invalidation_fence_fini for PT inval fences in error state
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 6 Dec 2024 01:50:22 +0000 (17:50 -0800)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Tue, 10 Dec 2024 21:11:14 +0000 (13:11 -0800)
commit65338639b79ce88aef5263cd518cde570a3c7c8e
tree13b2e24684bb5830d7e7d48d0aff1574645d84dc
parent720f63a838731d25ab34c306db59c12834ce09b4
drm/xe: Call invalidation_fence_fini for PT inval fences in error state

Invalidation_fence_init takes a PM reference, which is released in its
_fini counterpart, so we need to make sure that the latter is called,
even if the fence is in an error state.

Since we already have a function that calls _fini() and signals the
fence in the tlb inval code, we can expose that and call it from the PT
code.

Fixes: f002702290fc ("drm/xe: Hold a PM ref when GT TLB invalidations are inflight")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: <stable@vger.kernel.org> # v6.11+
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Nirmoy Das <nirmoy.das@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206015022.1567113-1-daniele.ceraolospurio@intel.com
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
drivers/gpu/drm/xe/xe_pt.c