bo->tbo.type == ttm_bo_type_kernel && !bo->parent also matches other kernel BOs with no parent, not just vm->root.bo, routing them to idle instead of needs_update. Compare against vm->root.bo directly.
Signed-off-by: Sunil Khatri <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 3eb778add39be..de44b9408c103 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -230,7 +230,7 @@ static void amdgpu_vm_bo_needs_update(struct amdgpu_vm_bo_base *vm_bo) * idle state. */ lists = amdgpu_vm_bo_lock_lists(vm_bo); - if (bo && bo->tbo.type == ttm_bo_type_kernel && !bo->parent) { + if (bo == vm_bo->vm->root.bo) { vm_bo->moved = false; list_move(&vm_bo->vm_status, &lists->idle); } else { -- 2.34.1
