Commit 5d35ed48 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: fix idle state and bulk_moveable flag

Add BOs to the idle state again and correctly clear the flag when
new BOs are added.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Tested-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b995795b
...@@ -156,12 +156,15 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base, ...@@ -156,12 +156,15 @@ static void amdgpu_vm_bo_base_init(struct amdgpu_vm_bo_base *base,
return; return;
list_add_tail(&base->bo_list, &bo->va); list_add_tail(&base->bo_list, &bo->va);
if (bo->tbo.type == ttm_bo_type_kernel)
list_move(&base->vm_status, &vm->relocated);
if (bo->tbo.resv != vm->root.base.bo->tbo.resv) if (bo->tbo.resv != vm->root.base.bo->tbo.resv)
return; return;
vm->bulk_moveable = false;
if (bo->tbo.type == ttm_bo_type_kernel)
list_move(&base->vm_status, &vm->relocated);
else
list_move(&base->vm_status, &vm->idle);
if (bo->preferred_domains & if (bo->preferred_domains &
amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type)) amdgpu_mem_type_to_domain(bo->tbo.mem.mem_type))
return; return;
...@@ -1121,7 +1124,7 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev, ...@@ -1121,7 +1124,7 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
struct amdgpu_vm_bo_base, struct amdgpu_vm_bo_base,
vm_status); vm_status);
bo_base->moved = false; bo_base->moved = false;
list_del_init(&bo_base->vm_status); list_move(&bo_base->vm_status, &vm->idle);
bo = bo_base->bo->parent; bo = bo_base->bo->parent;
if (!bo) if (!bo)
...@@ -2646,7 +2649,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, ...@@ -2646,7 +2649,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
return r; return r;
vm->pte_support_ats = false; vm->pte_support_ats = false;
vm->bulk_moveable = true;
if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE) { if (vm_context == AMDGPU_VM_CONTEXT_COMPUTE) {
vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode & vm->use_cpu_for_update = !!(adev->vm_manager.vm_update_mode &
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment