From: Matthew Brost Date: Thu, 26 Jan 2023 17:54:20 +0000 (-0800) Subject: drm/xe: Propagate VM unbind error to invalidation fence X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bae8ddae1881f645d679cd8189de995c26e9d694;p=linux.git 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 Signed-off-by: Rodrigo Vivi Reviewed-by: Niranjana Vishwanathapura --- diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c index 3333b413686eb..4299689fe6a8f 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); }