Lines Matching refs:abo
107 void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain) in amdgpu_bo_placement_from_domain() argument
109 struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev); in amdgpu_bo_placement_from_domain()
110 struct ttm_placement *placement = &abo->placement; in amdgpu_bo_placement_from_domain()
111 struct ttm_place *places = abo->placements; in amdgpu_bo_placement_from_domain()
112 u64 flags = abo->flags; in amdgpu_bo_placement_from_domain()
117 int8_t mem_id = KFD_XCP_MEM_ID(adev, abo->xcp_id); in amdgpu_bo_placement_from_domain()
138 if (abo->tbo.type == ttm_bo_type_kernel && in amdgpu_bo_placement_from_domain()
157 abo->flags & AMDGPU_GEM_CREATE_PREEMPTIBLE ? in amdgpu_bo_placement_from_domain()
164 if (domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM && in amdgpu_bo_placement_from_domain()
1154 struct amdgpu_bo *abo; in amdgpu_bo_move_notify() local
1159 abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_move_notify()
1160 amdgpu_vm_bo_invalidate(adev, abo, evict); in amdgpu_bo_move_notify()
1162 amdgpu_bo_kunmap(abo); in amdgpu_bo_move_notify()
1164 if (abo->tbo.base.dma_buf && !abo->tbo.base.import_attach && in amdgpu_bo_move_notify()
1166 dma_buf_move_notify(abo->tbo.base.dma_buf); in amdgpu_bo_move_notify()
1169 trace_amdgpu_bo_move(abo, new_mem ? new_mem->mem_type : -1, in amdgpu_bo_move_notify()
1236 struct amdgpu_bo *abo; in amdgpu_bo_release_notify() local
1242 abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_release_notify()
1244 WARN_ON(abo->vm_bo); in amdgpu_bo_release_notify()
1246 if (abo->kfd_bo) in amdgpu_bo_release_notify()
1247 amdgpu_amdkfd_release_notify(abo); in amdgpu_bo_release_notify()
1253 amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo); in amdgpu_bo_release_notify()
1256 !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) || in amdgpu_bo_release_notify()
1263 r = amdgpu_fill_buffer(abo, 0, bo->base.resv, &fence, true); in amdgpu_bo_release_notify()
1266 amdgpu_bo_fence(abo, fence, false); in amdgpu_bo_release_notify()
1288 struct amdgpu_bo *abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_fault_reserve_notify() local
1292 abo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; in amdgpu_bo_fault_reserve_notify()
1298 if (abo->tbo.pin_count > 0) in amdgpu_bo_fault_reserve_notify()
1303 amdgpu_bo_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_VRAM | in amdgpu_bo_fault_reserve_notify()
1307 abo->placements[0].flags |= TTM_PL_FLAG_DESIRED; in amdgpu_bo_fault_reserve_notify()
1309 r = ttm_bo_validate(bo, &abo->placement, &ctx); in amdgpu_bo_fault_reserve_notify()