[v2 30/31] drm/xe/svm: Add a helper to determine a vma is fault userptr
Oak Zeng
oak.zeng at intel.com
Tue Apr 9 20:17:41 UTC 2024
xe_vma_is_fault_userptr is added to determine the vma is
a fault userptr.
Signed-off-by: Oak Zeng <oak.zeng at intel.com>
---
drivers/gpu/drm/xe/xe_vm.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/xe/xe_vm.h b/drivers/gpu/drm/xe/xe_vm.h
index d55330988e32..a718f927e362 100644
--- a/drivers/gpu/drm/xe/xe_vm.h
+++ b/drivers/gpu/drm/xe/xe_vm.h
@@ -166,6 +166,11 @@ static inline bool xe_vma_is_userptr(struct xe_vma *vma)
!xe_vma_is_system_allocator(vma);
}
+static inline bool xe_vma_is_fault_userptr(struct xe_vma *vma)
+{
+ return xe_vma_is_userptr(vma) && (vma->gpuva.flags & XE_VMA_FAULT_USERPTR);
+}
+
/**
* to_userptr_vma() - Return a pointer to an embedding userptr vma
* @vma: Pointer to the embedded struct xe_vma
--
2.26.3
More information about the Intel-xe
mailing list