Lines Matching refs:bo_va

83 		if (entry->bo_va->base.vm == avm)  in kfd_mem_is_attached()
558 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_dmamap_userptr()
605 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_dmamap_dmabuf()
648 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_dmamap_sg_bo()
725 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_dmaunmap_userptr()
771 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_dmaunmap_sg_bo()
876 struct amdgpu_bo_va *bo_va; in kfd_mem_attach() local
964 bo_va = amdgpu_vm_bo_find(vm, bo[i]); in kfd_mem_attach()
965 if (!bo_va) in kfd_mem_attach()
966 bo_va = amdgpu_vm_bo_add(adev, vm, bo[i]); in kfd_mem_attach()
968 ++bo_va->ref_count; in kfd_mem_attach()
969 attachment[i]->bo_va = bo_va; in kfd_mem_attach()
971 if (unlikely(!attachment[i]->bo_va)) { in kfd_mem_attach()
991 if (attachment[i]->bo_va) { in kfd_mem_attach()
993 if (--attachment[i]->bo_va->ref_count == 0) in kfd_mem_attach()
994 amdgpu_vm_bo_del(adev, attachment[i]->bo_va); in kfd_mem_attach()
1007 struct amdgpu_bo *bo = attachment->bo_va->base.bo; in kfd_mem_detach()
1011 if (--attachment->bo_va->ref_count == 0) in kfd_mem_detach()
1012 amdgpu_vm_bo_del(attachment->adev, attachment->bo_va); in kfd_mem_detach()
1200 if ((vm && vm != entry->bo_va->base.vm) || in reserve_bo_and_cond_vms()
1205 ret = amdgpu_vm_lock_pd(entry->bo_va->base.vm, in reserve_bo_and_cond_vms()
1253 struct amdgpu_bo_va *bo_va = entry->bo_va; in unmap_bo_from_gpuvm() local
1255 struct amdgpu_vm *vm = bo_va->base.vm; in unmap_bo_from_gpuvm()
1257 if (bo_va->queue_refcount) { in unmap_bo_from_gpuvm()
1258 pr_debug("bo_va->queue_refcount %d\n", bo_va->queue_refcount); in unmap_bo_from_gpuvm()
1262 amdgpu_vm_bo_unmap(adev, bo_va, entry->va); in unmap_bo_from_gpuvm()
1264 amdgpu_vm_clear_freed(adev, vm, &bo_va->last_pt_update); in unmap_bo_from_gpuvm()
1266 amdgpu_sync_fence(sync, bo_va->last_pt_update); in unmap_bo_from_gpuvm()
1275 struct amdgpu_bo_va *bo_va = entry->bo_va; in update_gpuvm_pte() local
1284 ret = amdgpu_vm_bo_update(adev, bo_va, false); in update_gpuvm_pte()
1290 return amdgpu_sync_fence(sync, bo_va->last_pt_update); in update_gpuvm_pte()
1301 ret = amdgpu_vm_bo_map(entry->adev, entry->bo_va, entry->va, 0, in map_bo_to_gpuvm()
1302 amdgpu_bo_size(entry->bo_va->base.bo), in map_bo_to_gpuvm()
2091 if (entry->bo_va->base.vm != avm || entry->is_mapped) in amdgpu_amdkfd_gpuvm_map_memory_to_gpu()
2143 if (entry->bo_va->base.vm != vm) in amdgpu_amdkfd_gpuvm_dmaunmap_mem()
2145 if (entry->bo_va->base.bo->tbo.ttm && in amdgpu_amdkfd_gpuvm_dmaunmap_mem()
2146 !entry->bo_va->base.bo->tbo.ttm->sg) in amdgpu_amdkfd_gpuvm_dmaunmap_mem()
2189 if (entry->bo_va->base.vm != avm || !entry->is_mapped) in amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu()
3214 if (entry->is_mapped && entry->bo_va->base.vm == vm) in amdgpu_amdkfd_bo_mapped_to_dev()