Lines Matching refs:bo

152 static inline int amdgpu_bo_reserve(struct amdgpu_bo *bo, bool no_intr)  in amdgpu_bo_reserve()  argument
154 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_bo_reserve()
157 r = __ttm_bo_reserve(&bo->tbo, !no_intr, false, NULL); in amdgpu_bo_reserve()
160 dev_err(adev->dev, "%p reserve failed\n", bo); in amdgpu_bo_reserve()
166 static inline void amdgpu_bo_unreserve(struct amdgpu_bo *bo) in amdgpu_bo_unreserve() argument
168 ttm_bo_unreserve(&bo->tbo); in amdgpu_bo_unreserve()
171 static inline unsigned long amdgpu_bo_size(struct amdgpu_bo *bo) in amdgpu_bo_size() argument
173 return bo->tbo.num_pages << PAGE_SHIFT; in amdgpu_bo_size()
176 static inline unsigned amdgpu_bo_ngpu_pages(struct amdgpu_bo *bo) in amdgpu_bo_ngpu_pages() argument
178 return (bo->tbo.num_pages << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_ngpu_pages()
181 static inline unsigned amdgpu_bo_gpu_page_alignment(struct amdgpu_bo *bo) in amdgpu_bo_gpu_page_alignment() argument
183 return (bo->tbo.mem.page_alignment << PAGE_SHIFT) / AMDGPU_GPU_PAGE_SIZE; in amdgpu_bo_gpu_page_alignment()
192 static inline u64 amdgpu_bo_mmap_offset(struct amdgpu_bo *bo) in amdgpu_bo_mmap_offset() argument
194 return drm_vma_node_offset_addr(&bo->tbo.base.vma_node); in amdgpu_bo_mmap_offset()
200 static inline bool amdgpu_bo_in_cpu_visible_vram(struct amdgpu_bo *bo) in amdgpu_bo_in_cpu_visible_vram() argument
202 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev); in amdgpu_bo_in_cpu_visible_vram()
204 struct drm_mm_node *node = bo->tbo.mem.mm_node; in amdgpu_bo_in_cpu_visible_vram()
207 if (bo->tbo.mem.mem_type != TTM_PL_VRAM) in amdgpu_bo_in_cpu_visible_vram()
210 for (pages_left = bo->tbo.mem.num_pages; pages_left; in amdgpu_bo_in_cpu_visible_vram()
221 static inline bool amdgpu_bo_explicit_sync(struct amdgpu_bo *bo) in amdgpu_bo_explicit_sync() argument
223 return bo->flags & AMDGPU_GEM_CREATE_EXPLICIT_SYNC; in amdgpu_bo_explicit_sync()
226 bool amdgpu_bo_is_amdgpu_bo(struct ttm_buffer_object *bo);
240 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
242 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
243 void *amdgpu_bo_kptr(struct amdgpu_bo *bo);
244 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);
245 struct amdgpu_bo *amdgpu_bo_ref(struct amdgpu_bo *bo);
246 void amdgpu_bo_unref(struct amdgpu_bo **bo);
247 int amdgpu_bo_pin(struct amdgpu_bo *bo, u32 domain);
248 int amdgpu_bo_pin_restricted(struct amdgpu_bo *bo, u32 domain,
250 int amdgpu_bo_unpin(struct amdgpu_bo *bo);
255 int amdgpu_bo_fbdev_mmap(struct amdgpu_bo *bo,
257 int amdgpu_bo_set_tiling_flags(struct amdgpu_bo *bo, u64 tiling_flags);
258 void amdgpu_bo_get_tiling_flags(struct amdgpu_bo *bo, u64 *tiling_flags);
259 int amdgpu_bo_set_metadata (struct amdgpu_bo *bo, void *metadata,
261 int amdgpu_bo_get_metadata(struct amdgpu_bo *bo, void *buffer,
264 void amdgpu_bo_move_notify(struct ttm_buffer_object *bo,
267 void amdgpu_bo_release_notify(struct ttm_buffer_object *bo);
268 int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo);
269 void amdgpu_bo_fence(struct amdgpu_bo *bo, struct dma_fence *fence,
271 int amdgpu_bo_sync_wait(struct amdgpu_bo *bo, void *owner, bool intr);
272 u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo);
273 int amdgpu_bo_validate(struct amdgpu_bo *bo);