Lines Matching refs:vma

107 static inline u64 xe_vma_start(struct xe_vma *vma)  in xe_vma_start()  argument
109 return vma->gpuva.va.addr; in xe_vma_start()
112 static inline u64 xe_vma_size(struct xe_vma *vma) in xe_vma_size() argument
114 return vma->gpuva.va.range; in xe_vma_size()
117 static inline u64 xe_vma_end(struct xe_vma *vma) in xe_vma_end() argument
119 return xe_vma_start(vma) + xe_vma_size(vma); in xe_vma_end()
122 static inline u64 xe_vma_bo_offset(struct xe_vma *vma) in xe_vma_bo_offset() argument
124 return vma->gpuva.gem.offset; in xe_vma_bo_offset()
127 static inline struct xe_bo *xe_vma_bo(struct xe_vma *vma) in xe_vma_bo() argument
129 return !vma->gpuva.gem.obj ? NULL : in xe_vma_bo()
130 container_of(vma->gpuva.gem.obj, struct xe_bo, ttm.base); in xe_vma_bo()
133 static inline struct xe_vm *xe_vma_vm(struct xe_vma *vma) in xe_vma_vm() argument
135 return container_of(vma->gpuva.vm, struct xe_vm, gpuvm); in xe_vma_vm()
138 static inline bool xe_vma_read_only(struct xe_vma *vma) in xe_vma_read_only() argument
140 return vma->gpuva.flags & XE_VMA_READ_ONLY; in xe_vma_read_only()
143 static inline u64 xe_vma_userptr(struct xe_vma *vma) in xe_vma_userptr() argument
145 return vma->gpuva.gem.offset; in xe_vma_userptr()
148 static inline bool xe_vma_is_null(struct xe_vma *vma) in xe_vma_is_null() argument
150 return vma->gpuva.flags & DRM_GPUVA_SPARSE; in xe_vma_is_null()
153 static inline bool xe_vma_has_no_bo(struct xe_vma *vma) in xe_vma_has_no_bo() argument
155 return !xe_vma_bo(vma); in xe_vma_has_no_bo()
158 static inline bool xe_vma_is_userptr(struct xe_vma *vma) in xe_vma_is_userptr() argument
160 return xe_vma_has_no_bo(vma) && !xe_vma_is_null(vma); in xe_vma_is_userptr()
169 static inline struct xe_userptr_vma *to_userptr_vma(struct xe_vma *vma) in to_userptr_vma() argument
171 xe_assert(xe_vma_vm(vma)->xe, xe_vma_is_userptr(vma)); in to_userptr_vma()
172 return container_of(vma, struct xe_userptr_vma, vma); in to_userptr_vma()
211 struct dma_fence *xe_vma_rebind(struct xe_vm *vm, struct xe_vma *vma,
214 int xe_vm_invalidate_vma(struct xe_vma *vma);
245 int xe_vm_lock_vma(struct drm_exec *exec, struct xe_vma *vma);