[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250809135137.259427-5-thomas.hellstrom@linux.intel.com>
Date: Sat, 9 Aug 2025 15:51:35 +0200
From: Thomas Hellström <thomas.hellstrom@...ux.intel.com>
To: intel-xe@...ts.freedesktop.org
Cc: Matthew Brost <matthew.brost@...el.com>,
Christian König <christian.koenig@....com>,
dri-devel@...ts.freedesktop.org,
Jason Gunthorpe <jgg@...pe.ca>,
Andrew Morton <akpm@...ux-foundation.org>,
Simona Vetter <simona.vetter@...ll.ch>,
Dave Airlie <airlied@...il.com>,
linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 4/6] drm/xe: Skip waiting on unarmed fences in xe_gt_tlb_invalidation_fence_wait
From: Matthew Brost <matthew.brost@...el.com>
Avoids unnecessary waits when the TLB invalidation fence has not been
armed, simplifying caller logic in cases where the fence status is
uncertain.
Signed-off-by: Matthew Brost <matthew.brost@...el.com>
---
drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
index f7f0f2eaf4b5..c6d4398d3429 100644
--- a/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
+++ b/drivers/gpu/drm/xe/xe_gt_tlb_invalidation.h
@@ -34,7 +34,8 @@ void xe_gt_tlb_invalidation_fence_signal(struct xe_gt_tlb_invalidation_fence *fe
static inline void
xe_gt_tlb_invalidation_fence_wait(struct xe_gt_tlb_invalidation_fence *fence)
{
- dma_fence_wait(&fence->base, false);
+ if (fence->seqno)
+ dma_fence_wait(&fence->base, false);
}
#endif /* _XE_GT_TLB_INVALIDATION_ */
--
2.50.1
Powered by blists - more mailing lists