Lines Matching refs:bo

45 #define to_amdgpu_bo_user(abo) container_of((abo), struct amdgpu_bo_user, bo)
46 #define to_amdgpu_bo_vm(abo) container_of((abo), struct amdgpu_bo_vm, bo)
58 void (*destroy)(struct ttm_buffer_object *bo);
129 struct amdgpu_bo bo; member
138 struct amdgpu_bo bo; member
212 static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr) in amdgpu_bo_reserve() argument
214 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_bo_reserve()
217 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL); in amdgpu_bo_reserve()
220 dev_err(adev->dev, "%p reserve failed\n", bo); in amdgpu_bo_reserve()
226 static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo) in amdgpu_bo_unreserve() argument
228 ttm_bo_unreserve(&bo->tbo); in amdgpu_bo_unreserve()
231 static inline unsigned long amdgpu_bo_size(struct amdgpu_bo *bo) in amdgpu_bo_size() argument
233 return bo->tbo.base.size; in amdgpu_bo_size()
236 static inline unsigned amdgpu_bo_ngpu_pages(struct amdgpu_bo *bo) in amdgpu_bo_ngpu_pages() argument
238 return bo->tbo.base.size / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_ngpu_pages()
241 static inline unsigned amdgpu_bo_gpu_page_alignment(struct amdgpu_bo *bo) in amdgpu_bo_gpu_page_alignment() argument
243 return (bo->tbo.page_alignment << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_gpu_page_alignment()
252 static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo) in amdgpu_bo_mmap_offset() argument
254 return drm_vma_node_offset_addr(&bo->tbo.base.vma_node); in amdgpu_bo_mmap_offset()
260 static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo) in amdgpu_bo_explicit_sync() argument
262 return bo->flags & AMDGPU_GEM_CREATE_EXPLICIT_SYNC; in amdgpu_bo_explicit_sync()
271 static inline bool amdgpu_bo_encrypted(struct amdgpu_bo *bo) in amdgpu_bo_encrypted() argument
273 return bo->flags & AMDGPU_GEM_CREATE_ENCRYPTED; in amdgpu_bo_encrypted()
276 bool amdgpu_bo_is_amdgpu_bo(struct ttm_buffer_object *bo);
299 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
301 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
302 void *amdgpu_bo_kptr(struct amdgpu_bo *bo);
303 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);
304 struct amdgpu_bo *amdgpu_bo_ref(struct amdgpu_bo *bo);
305 void amdgpu_bo_unref(struct amdgpu_bo **bo);
306 int amdgpu_bo_pin(struct amdgpu_bo *bo, u32 domain);
307 void amdgpu_bo_unpin(struct amdgpu_bo *bo);
310 int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags);
311 void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags);
312 int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
314 int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
317 void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
320 void amdgpu_bo_release_notify(struct ttm_buffer_object *bo);
321 vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
322 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,
327 int amdgpu_bo_sync_wait(struct amdgpu_bo *bo, void *owner, bool intr);
328 u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo);
329 u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo);
330 void amdgpu_bo_get_memory(struct amdgpu_bo *bo,
372 u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m);