All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/xe: Always invalidate TLBs on userptr invalidation
@ 2026-03-23 21:17 Stuart Summers
  2026-03-23 21:24 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Stuart Summers @ 2026-03-23 21:17 UTC (permalink / raw)
  Cc: matthew.brost, niranjana.vishwanathapura, intel-xe,
	Stuart Summers

Right now we are only invalidating TLBs when we are
running in fault mode. For non-fault mode based userptr
VMs, we then rely on context switches after an MMAP has
happened to ensure the TLB is clean for the next submission.

With context based TLB invalidation, we can no longer rely
on the implicit invalidation happening during context switch,
so remove the fault mode limiter and simply always perform
that invalidation.

I was able to see this behavior using the following test:
xe_exec_compute_mode --r twice-userptr-invalidate

Signed-off-by: Stuart Summers <stuart.summers@intel.com>
---
 drivers/gpu/drm/xe/xe_userptr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_userptr.c b/drivers/gpu/drm/xe/xe_userptr.c
index 6761005c0b90..dfd679dd98d9 100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -102,7 +102,7 @@ xe_vma_userptr_do_inval(struct xe_vm *vm, struct xe_userptr_vma *uvma, bool is_d
 				    false, MAX_SCHEDULE_TIMEOUT);
 	XE_WARN_ON(err <= 0);
 
-	if (xe_vm_in_fault_mode(vm) && userptr->initial_bind) {
+	if (userptr->initial_bind) {
 		if (!userptr->finish_inuse) {
 			/*
 			 * Defer the TLB wait to an extra pass so the caller
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-03-25 22:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-23 21:17 [PATCH] drm/xe: Always invalidate TLBs on userptr invalidation Stuart Summers
2026-03-23 21:24 ` ✓ CI.KUnit: success for " Patchwork
2026-03-23 22:01 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-03-24  2:21 ` [PATCH] " Matthew Brost
2026-03-24 14:53   ` Summers, Stuart
2026-03-24 21:51     ` Summers, Stuart
2026-03-24 23:53       ` Matthew Brost
2026-03-25 20:35         ` Summers, Stuart
2026-03-25 21:47           ` Matthew Brost
2026-03-25 22:21             ` Summers, Stuart
2026-03-24  6:12 ` ✓ Xe.CI.FULL: success for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.