Lines Matching refs:abo

112 void amdgpu_bo_placement_from_domain(struct amdgpu_bo *abo, u32 domain)  in amdgpu_bo_placement_from_domain()  argument
114 struct amdgpu_device *adev = amdgpu_ttm_adev(abo->tbo.bdev); in amdgpu_bo_placement_from_domain()
115 struct ttm_placement *placement = &abo->placement; in amdgpu_bo_placement_from_domain()
116 struct ttm_place *places = abo->placements; in amdgpu_bo_placement_from_domain()
117 u64 flags = abo->flags; in amdgpu_bo_placement_from_domain()
122 int8_t mem_id = KFD_XCP_MEM_ID(adev, abo->xcp_id); in amdgpu_bo_placement_from_domain()
143 if (abo->tbo.type == ttm_bo_type_kernel && in amdgpu_bo_placement_from_domain()
162 abo->flags & AMDGPU_GEM_CREATE_PREEMPTIBLE ? in amdgpu_bo_placement_from_domain()
169 if (abo->tbo.resource && !(adev->flags & AMD_IS_APU) && in amdgpu_bo_placement_from_domain()
170 domain & abo->preferred_domains & AMDGPU_GEM_DOMAIN_VRAM) in amdgpu_bo_placement_from_domain()
1274 struct amdgpu_bo *abo; in amdgpu_bo_move_notify() local
1279 abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_move_notify()
1280 amdgpu_vm_bo_move(abo, new_mem, evict); in amdgpu_bo_move_notify()
1282 amdgpu_bo_kunmap(abo); in amdgpu_bo_move_notify()
1284 if (abo->tbo.base.dma_buf && !drm_gem_is_imported(&abo->tbo.base) && in amdgpu_bo_move_notify()
1286 dma_buf_invalidate_mappings(abo->tbo.base.dma_buf); in amdgpu_bo_move_notify()
1289 trace_amdgpu_bo_move(abo, new_mem ? new_mem->mem_type : -1, in amdgpu_bo_move_notify()
1304 struct amdgpu_bo *abo; in amdgpu_bo_release_notify() local
1310 abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_release_notify()
1312 WARN_ON(abo->vm_bo); in amdgpu_bo_release_notify()
1314 if (abo->kfd_bo) in amdgpu_bo_release_notify()
1315 amdgpu_amdkfd_release_notify(abo); in amdgpu_bo_release_notify()
1326 amdgpu_amdkfd_remove_all_eviction_fences(abo); in amdgpu_bo_release_notify()
1329 !(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) || in amdgpu_bo_release_notify()
1338 abo, &bo->base._resv, &fence, in amdgpu_bo_release_notify()
1366 struct amdgpu_bo *abo = ttm_to_amdgpu_bo(bo); in amdgpu_bo_fault_reserve_notify() local
1370 abo->flags |= AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; in amdgpu_bo_fault_reserve_notify()
1376 if (abo->tbo.pin_count > 0) in amdgpu_bo_fault_reserve_notify()
1381 amdgpu_bo_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_VRAM | in amdgpu_bo_fault_reserve_notify()
1385 abo->placements[0].flags |= TTM_PL_FLAG_DESIRED; in amdgpu_bo_fault_reserve_notify()
1387 r = ttm_bo_validate(bo, &abo->placement, &ctx); in amdgpu_bo_fault_reserve_notify()