diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index f24554f2d0e5..2ed99b8f7da7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |||
@@ -1983,25 +1983,25 @@ int amdgpu_vm_clear_freed(struct amdgpu_device *adev, | |||
1983 | } | 1983 | } |
1984 | 1984 | ||
1985 | /** | 1985 | /** |
1986 | * amdgpu_vm_clear_invalids - clear invalidated BOs in the PT | 1986 | * amdgpu_vm_clear_moved - clear moved BOs in the PT |
1987 | * | 1987 | * |
1988 | * @adev: amdgpu_device pointer | 1988 | * @adev: amdgpu_device pointer |
1989 | * @vm: requested vm | 1989 | * @vm: requested vm |
1990 | * | 1990 | * |
1991 | * Make sure all invalidated BOs are cleared in the PT. | 1991 | * Make sure all moved BOs are cleared in the PT. |
1992 | * Returns 0 for success. | 1992 | * Returns 0 for success. |
1993 | * | 1993 | * |
1994 | * PTs have to be reserved and mutex must be locked! | 1994 | * PTs have to be reserved and mutex must be locked! |
1995 | */ | 1995 | */ |
1996 | int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, | 1996 | int amdgpu_vm_clear_moved(struct amdgpu_device *adev, struct amdgpu_vm *vm, |
1997 | struct amdgpu_vm *vm, struct amdgpu_sync *sync) | 1997 | struct amdgpu_sync *sync) |
1998 | { | 1998 | { |
1999 | struct amdgpu_bo_va *bo_va = NULL; | 1999 | struct amdgpu_bo_va *bo_va = NULL; |
2000 | int r = 0; | 2000 | int r = 0; |
2001 | 2001 | ||
2002 | spin_lock(&vm->status_lock); | 2002 | spin_lock(&vm->status_lock); |
2003 | while (!list_empty(&vm->invalidated)) { | 2003 | while (!list_empty(&vm->moved)) { |
2004 | bo_va = list_first_entry(&vm->invalidated, | 2004 | bo_va = list_first_entry(&vm->moved, |
2005 | struct amdgpu_bo_va, base.vm_status); | 2005 | struct amdgpu_bo_va, base.vm_status); |
2006 | spin_unlock(&vm->status_lock); | 2006 | spin_unlock(&vm->status_lock); |
2007 | 2007 | ||
@@ -2396,7 +2396,7 @@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, | |||
2396 | spin_lock(&bo_base->vm->status_lock); | 2396 | spin_lock(&bo_base->vm->status_lock); |
2397 | if (list_empty(&bo_base->vm_status)) | 2397 | if (list_empty(&bo_base->vm_status)) |
2398 | list_add(&bo_base->vm_status, | 2398 | list_add(&bo_base->vm_status, |
2399 | &bo_base->vm->invalidated); | 2399 | &bo_base->vm->moved); |
2400 | spin_unlock(&bo_base->vm->status_lock); | 2400 | spin_unlock(&bo_base->vm->status_lock); |
2401 | } | 2401 | } |
2402 | } | 2402 | } |
@@ -2465,7 +2465,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
2465 | for (i = 0; i < AMDGPU_MAX_VMHUBS; i++) | 2465 | for (i = 0; i < AMDGPU_MAX_VMHUBS; i++) |
2466 | vm->reserved_vmid[i] = NULL; | 2466 | vm->reserved_vmid[i] = NULL; |
2467 | spin_lock_init(&vm->status_lock); | 2467 | spin_lock_init(&vm->status_lock); |
2468 | INIT_LIST_HEAD(&vm->invalidated); | 2468 | INIT_LIST_HEAD(&vm->moved); |
2469 | INIT_LIST_HEAD(&vm->cleared); | 2469 | INIT_LIST_HEAD(&vm->cleared); |
2470 | INIT_LIST_HEAD(&vm->freed); | 2470 | INIT_LIST_HEAD(&vm->freed); |
2471 | 2471 | ||