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
185 static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr) in amdgpu_bo_reserve() argument
187 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_bo_reserve()
190 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL); in amdgpu_bo_reserve()
193 dev_err(adev->dev, "%p reserve failed\n", bo); in amdgpu_bo_reserve()
199 static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo) in amdgpu_bo_unreserve() argument
201 ttm_bo_unreserve(&bo->tbo); in amdgpu_bo_unreserve()
204 static inline unsigned long amdgpu_bo_size(struct amdgpu_bo *bo) in amdgpu_bo_size() argument
206 return bo->tbo.base.size; in amdgpu_bo_size()
209 static inline unsigned amdgpu_bo_ngpu_pages(struct amdgpu_bo *bo) in amdgpu_bo_ngpu_pages() argument
211 return bo->tbo.base.size / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_ngpu_pages()
214 static inline unsigned amdgpu_bo_gpu_page_alignment(struct amdgpu_bo *bo) in amdgpu_bo_gpu_page_alignment() argument
216 return (bo->tbo.page_alignment << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_gpu_page_alignment()
225 static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo) in amdgpu_bo_mmap_offset() argument
227 return drm_vma_node_offset_addr(&bo->tbo.base.vma_node); in amdgpu_bo_mmap_offset()
233 static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo) in amdgpu_bo_explicit_sync() argument
235 return bo->flags & AMDGPU_GEM_CREATE_EXPLICIT_SYNC; in amdgpu_bo_explicit_sync()
244 static inline bool amdgpu_bo_encrypted(struct amdgpu_bo *bo) in amdgpu_bo_encrypted() argument
246 return bo->flags & AMDGPU_GEM_CREATE_ENCRYPTED; in amdgpu_bo_encrypted()
249 bool amdgpu_bo_is_amdgpu_bo(struct ttm_buffer_object *bo);
265 struct amdgpu_bo **bo,
276 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
278 void amdgpu_bo_free_isp_user(struct amdgpu_bo *bo);
279 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
280 void *amdgpu_bo_kptr(struct amdgpu_bo *bo);
281 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);
282 struct amdgpu_bo *amdgpu_bo_ref(struct amdgpu_bo *bo);
283 void amdgpu_bo_unref(struct amdgpu_bo **bo);
284 int amdgpu_bo_pin(struct amdgpu_bo *bo, u32 domain);
285 void amdgpu_bo_unpin(struct amdgpu_bo *bo);
288 int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags);
289 void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags);
290 int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
292 int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
295 void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
298 void amdgpu_bo_release_notify(struct ttm_buffer_object *bo);
299 vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
300 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,
305 int amdgpu_bo_sync_wait(struct amdgpu_bo *bo, void *owner, bool intr);
306 u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo);
307 u64 amdgpu_bo_fb_aper_addr(struct amdgpu_bo *bo);
308 u64 amdgpu_bo_gpu_offset_no_check(struct amdgpu_bo *bo);
309 uint32_t amdgpu_bo_mem_stats_placement(struct amdgpu_bo *bo);
349 u64 amdgpu_bo_print_info(int id, struct amdgpu_bo *bo, struct seq_file *m);