Skip to content

Commit fd1c808

Browse files
Thomas Hellströmlucasdemarchi
authored andcommitted
drm/xe: Make TLB invalidation fences unordered
They can actually complete out-of-order, so allocate a unique fence context for each fence. Fixes: 5387e86 ("drm/xe: Add TLB invalidation fence after rebinds issued from execs") Cc: Matthew Brost <[email protected]> Cc: <[email protected]> # v6.8+ Signed-off-by: Thomas Hellström <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 0453f17) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent a00e7e3 commit fd1c808

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

drivers/gpu/drm/xe/xe_gt_tlb_invalidation.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ int xe_gt_tlb_invalidation_init(struct xe_gt *gt)
6161
INIT_LIST_HEAD(&gt->tlb_invalidation.pending_fences);
6262
spin_lock_init(&gt->tlb_invalidation.pending_lock);
6363
spin_lock_init(&gt->tlb_invalidation.lock);
64-
gt->tlb_invalidation.fence_context = dma_fence_context_alloc(1);
6564
INIT_DELAYED_WORK(&gt->tlb_invalidation.fence_tdr,
6665
xe_gt_tlb_fence_timeout);
6766

drivers/gpu/drm/xe/xe_gt_types.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,6 @@ struct xe_gt {
177177
* xe_gt_tlb_fence_timeout after the timeut interval is over.
178178
*/
179179
struct delayed_work fence_tdr;
180-
/** @tlb_invalidation.fence_context: context for TLB invalidation fences */
181-
u64 fence_context;
182-
/**
183-
* @tlb_invalidation.fence_seqno: seqno to TLB invalidation fences, protected by
184-
* tlb_invalidation.lock
185-
*/
186-
u32 fence_seqno;
187180
/** @tlb_invalidation.lock: protects TLB invalidation fences */
188181
spinlock_t lock;
189182
} tlb_invalidation;

drivers/gpu/drm/xe/xe_pt.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,8 +1135,7 @@ static int invalidation_fence_init(struct xe_gt *gt,
11351135
spin_lock_irq(&gt->tlb_invalidation.lock);
11361136
dma_fence_init(&ifence->base.base, &invalidation_fence_ops,
11371137
&gt->tlb_invalidation.lock,
1138-
gt->tlb_invalidation.fence_context,
1139-
++gt->tlb_invalidation.fence_seqno);
1138+
dma_fence_context_alloc(1), 1);
11401139
spin_unlock_irq(&gt->tlb_invalidation.lock);
11411140

11421141
INIT_LIST_HEAD(&ifence->base.link);

0 commit comments

Comments
 (0)