]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe: Split TLB invalidation into submit and wait steps
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 5 Mar 2026 09:39:08 +0000 (10:39 +0100)
committerThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 11 Mar 2026 08:32:59 +0000 (09:32 +0100)
commit400ee0f4f1f06b2c447ba87868b6da613445c31a
treebd49f728ca859b087f6904eb7a105a6d43cd58a2
parent18c4e536959e983b74c6a21968f2513a6ca2acf0
drm/xe: Split TLB invalidation into submit and wait steps

xe_vm_range_tilemask_tlb_inval() submits TLB invalidation requests to
all GTs in a tile mask and then immediately waits for them to complete
before returning. This is fine for the existing callers, but a
subsequent patch will need to defer the wait in order to overlap TLB
invalidations across multiple VMAs.

Introduce xe_tlb_inval_range_tilemask_submit() and
xe_tlb_inval_batch_wait() in xe_tlb_inval.c as the submit and wait
halves respectively. The batch of fences is carried in the new
xe_tlb_inval_batch structure. Remove xe_vm_range_tilemask_tlb_inval()
and convert all three call sites to the new API.

v3:
- Don't wait on TLB invalidation batches if the corresponding batch
  submit returns an error. (Matt Brost)
- s/_batch/batch/ (Matt Brost)

Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260305093909.43623-4-thomas.hellstrom@linux.intel.com
drivers/gpu/drm/xe/xe_svm.c
drivers/gpu/drm/xe/xe_tlb_inval.c
drivers/gpu/drm/xe/xe_tlb_inval.h
drivers/gpu/drm/xe/xe_tlb_inval_types.h
drivers/gpu/drm/xe/xe_vm.c
drivers/gpu/drm/xe/xe_vm.h
drivers/gpu/drm/xe/xe_vm_madvise.c
drivers/gpu/drm/xe/xe_vm_types.h