Lines Matching refs:bo
70 static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr) in amdgpu_bo_reserve() argument
74 r = ttm_bo_reserve(&bo->tbo, !no_intr, false, false, 0); in amdgpu_bo_reserve()
77 dev_err(bo->adev->dev, "%p reserve failed\n", bo); in amdgpu_bo_reserve()
83 static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo) in amdgpu_bo_unreserve() argument
85 ttm_bo_unreserve(&bo->tbo); in amdgpu_bo_unreserve()
97 static inline u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) in amdgpu_bo_gpu_offset() argument
99 return bo->tbo.offset; in amdgpu_bo_gpu_offset()
102 static inline unsigned long amdgpu_bo_size(struct amdgpu_bo *bo) in amdgpu_bo_size() argument
104 return bo->tbo.num_pages << PAGE_SHIFT; in amdgpu_bo_size()
107 static inline unsigned amdgpu_bo_ngpu_pages(struct amdgpu_bo *bo) in amdgpu_bo_ngpu_pages() argument
109 return (bo->tbo.num_pages << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_ngpu_pages()
112 static inline unsigned amdgpu_bo_gpu_page_alignment(struct amdgpu_bo *bo) in amdgpu_bo_gpu_page_alignment() argument
114 return (bo->tbo.mem.page_alignment << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_gpu_page_alignment()
123 static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo) in amdgpu_bo_mmap_offset() argument
125 return drm_vma_node_offset_addr(&bo->tbo.vma_node); in amdgpu_bo_mmap_offset()
141 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
142 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);
143 struct amdgpu_bo *amdgpu_bo_ref(struct amdgpu_bo *bo);
144 void amdgpu_bo_unref(struct amdgpu_bo **bo);
145 int amdgpu_bo_pin(struct amdgpu_bo *bo, u32 domain, u64 *gpu_addr);
146 int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
149 int amdgpu_bo_unpin(struct amdgpu_bo *bo);
154 int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo,
156 int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags);
157 void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags);
158 int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
160 int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
163 void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
165 int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
166 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct fence *fence,