Skip to content

Implement missing invalidations and flushes

Thomas Hellström intel-xe 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm/xe: Invalidate TLB also on bind if in scratch page modedrivers/gpu/drm/xe/regs/xe_gpu_commands.h drivers/gpu/drm/xe/xe_pt.c drivers/gpu/drm/xe/xe_ring_ops.c +2 more+57 -132 replies
2/2drm/xe: Emit a render cache flush after each rcs/ccs batchdrivers/gpu/drm/xe/Makefile drivers/gpu/drm/xe/regs/xe_gpu_commands.h drivers/gpu/drm/xe/xe_ring_ops.c +1 more+40 -10 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJosé Roberto de SouzaMatthew Brost
SeriesT-b
1/2T-b A-b R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Intel-xe] [PATCH v2 0/2] Implement missing invalidations and flushes

Mesa is seeing unexpected content in some tests. Fixing those require a TLB invalidation at batch start and a render cache flush at batch end.

KMD also requires the latter to make sure any GPU side caches are flushed before handing memory over for reuse. This is implemented in patch 2.

The former is likely due to scratch PTEs remaining in the TLB after a prefetch or similar. We could discuss whether user-space should be responsible for a TLB invalidation after a VM_BIND operation, but patch 1 implements a TLB flush at batch start for non-LR vms with scratch pages. For LR vms with scratch pages the TLB flush is incoporated in the bind fence.

The TLB invalidation can be optimized / coalesced later.

Thomas Hellström (2):
drm/xe: Invalidate TLB also on bind if in scratch page mode drm/xe: Emit a render cache flush after each rcs/ccs batch

 drivers/gpu/drm/xe/Makefile               |  2 +-
 drivers/gpu/drm/xe/regs/xe_gpu_commands.h |  4 ++
 drivers/gpu/drm/xe/xe_pt.c                | 17 ++++-
 drivers/gpu/drm/xe/xe_ring_ops.c          | 82 ++++++++++++++++++++---
 drivers/gpu/drm/xe/xe_vm.c                |  2 +
 drivers/gpu/drm/xe/xe_vm_types.h          |  3 +
 drivers/gpu/drm/xe/xe_wa_oob.rules        |  1 +
 7 files changed, 97 insertions(+), 14 deletions(-)
Signature · 1 line
2.39.2