Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xe/userptr: TLB invalidation new pm_runtime ref before submit
@ 2026-07-15 14:01 Dnyaneshwar Bhadane
  2026-07-15 14:12 ` ✓ CI.KUnit: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dnyaneshwar Bhadane @ 2026-07-15 14:01 UTC (permalink / raw)
  To: intel-xe; +Cc: Dnyaneshwar Bhadane

Take a proper runtime PM reference before TLB invalidation.
The MMU notifier path has no outer xe_pm_runtime_get()
protection, but xe_tlb_inval_fence_init() called from
xe_vm_invalidate_vma_submit() uses xe_pm_runtime_get_noresume()
which requires an existing reference. The fence itself will
hold its own noresume ref until it signals.

Signed-off-by: Dnyaneshwar Bhadane <dnyaneshwar.bhadane@intel.com>
---
 drivers/gpu/drm/xe/xe_userptr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_userptr.c b/drivers/gpu/drm/xe/xe_userptr.c
index 1d2ab678faf5..fc7e4b00fe17 100644
--- a/drivers/gpu/drm/xe/xe_userptr.c
+++ b/drivers/gpu/drm/xe/xe_userptr.c
@@ -8,6 +8,7 @@
 
 #include <linux/mm.h>
 
+#include "xe_pm.h"
 #include "xe_tlb_inval.h"
 #include "xe_trace_bo.h"
 
@@ -103,6 +104,7 @@ xe_vma_userptr_do_inval(struct xe_vm *vm, struct xe_userptr_vma *uvma, bool is_d
 	XE_WARN_ON(err <= 0);
 
 	if (xe_vm_in_fault_mode(vm) && userptr->initial_bind) {
+		guard(xe_pm_runtime)(vm->xe);
 		if (!userptr->finish_inuse) {
 			/*
 			 * Defer the TLB wait to an extra pass so the caller
-- 
2.54.0


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

end of thread, other threads:[~2026-07-15 22:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 14:01 [PATCH] xe/userptr: TLB invalidation new pm_runtime ref before submit Dnyaneshwar Bhadane
2026-07-15 14:12 ` ✓ CI.KUnit: success for " Patchwork
2026-07-15 15:02 ` [PATCH] " Matthew Auld
2026-07-15 19:57   ` Matthew Brost
2026-07-15 22:11     ` Matthew Brost
2026-07-15 15:06 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-15 16:36 ` ✓ Xe.CI.FULL: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox