summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_pt.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2023-01-26 20:54:20 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:27:47 +0300
commitbae8ddae1881f645d679cd8189de995c26e9d694 (patch)
tree8012611ab9eabc5ee5493831e6864680989e25af /drivers/gpu/drm/xe/xe_pt.c
parentc3ca5465564e7b6459e868b3433fff4e44a7fd64 (diff)
downloadlinux-bae8ddae1881f645d679cd8189de995c26e9d694.tar.xz
drm/xe: Propagate VM unbind error to invalidation fence
If a VM unbind hits an error, do not issue a TLB invalidation and propagate the error the invalidation fence. Signed-off-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pt.c')
-rw-r--r--drivers/gpu/drm/xe/xe_pt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index 3333b413686e..4299689fe6a8 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -1496,7 +1496,13 @@ static void invalidation_fence_cb(struct dma_fence *fence,
container_of(cb, struct invalidation_fence, cb);
trace_xe_gt_tlb_invalidation_fence_cb(&ifence->base);
- queue_work(system_wq, &ifence->work);
+ if (!ifence->fence->error) {
+ queue_work(system_wq, &ifence->work);
+ } else {
+ ifence->base.base.error = ifence->fence->error;
+ dma_fence_signal(&ifence->base.base);
+ dma_fence_put(&ifence->base.base);
+ }
dma_fence_put(ifence->fence);
}