Lines Matching defs:bo
68 struct amdgpu_bo *bo = container_of(mni, struct amdgpu_bo, notifier);
69 struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
79 amdgpu_vm_bo_invalidate(bo, false);
80 r = dma_resv_wait_timeout(bo->tbo.base.resv, DMA_RESV_USAGE_BOOKKEEP,
84 DRM_ERROR("(%ld) failed to wait for user bo\n", r);
106 struct amdgpu_bo *bo = container_of(mni, struct amdgpu_bo, notifier);
111 amdgpu_amdkfd_evict_userptr(mni, cur_seq, bo->kfd_bo);
123 * @bo: amdgpu buffer object
129 int amdgpu_hmm_register(struct amdgpu_bo *bo, unsigned long addr)
133 if (bo->kfd_bo)
134 r = mmu_interval_notifier_insert(&bo->notifier, current->mm,
135 addr, amdgpu_bo_size(bo),
138 r = mmu_interval_notifier_insert(&bo->notifier, current->mm, addr,
139 amdgpu_bo_size(bo),
147 bo->notifier.mm = NULL;
155 * @bo: amdgpu buffer object
159 void amdgpu_hmm_unregister(struct amdgpu_bo *bo)
161 if (!bo->notifier.mm)
163 mmu_interval_notifier_remove(&bo->notifier);
164 bo->notifier.mm = NULL;
256 * @bo: optional buffer object to associate with this HMM range
258 * Allocates memory for amdgpu_hmm_range and associates it with the @bo passed.
259 * The reference count of the @bo is incremented.
265 struct amdgpu_hmm_range *amdgpu_hmm_range_alloc(struct amdgpu_bo *bo)
273 range->bo = amdgpu_bo_ref(bo);
282 * hmm_pfns and the dropping reference of associated bo if any.
292 amdgpu_bo_unref(&range->bo);