aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-08-01 05:27:36 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-08-17 15:46:08 -0400
commit27c7b9aeecd7c06a3b527795807c19a0bbe25c1e (patch)
tree6e1c15ace8b342f460455a36ea4a47d5906e82f6 /drivers/gpu/drm/amd/amdgpu
parentec681545afe5a448b43a2fe5c206ee48e19dabb3 (diff)
drm/amdgpu: rename VM invalidated to moved
That better describes what happens here with the BO. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h6
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 75e7141c8de4..15d4a28d73bb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -825,7 +825,7 @@ static int amdgpu_bo_vm_update_pte(struct amdgpu_cs_parser *p)
825 825
826 } 826 }
827 827
828 r = amdgpu_vm_clear_invalids(adev, vm, &p->job->sync); 828 r = amdgpu_vm_clear_moved(adev, vm, &p->job->sync);
829 829
830 if (amdgpu_vm_debug && p->bo_list) { 830 if (amdgpu_vm_debug && p->bo_list) {
831 /* Invalidate all BOs to test for userspace bugs */ 831 /* Invalidate all BOs to test for userspace bugs */
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 */
1996int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, 1996int 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
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 95e5e81e1026..a740b57e9eee 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -129,7 +129,7 @@ struct amdgpu_vm {
129 spinlock_t status_lock; 129 spinlock_t status_lock;
130 130
131 /* BOs moved, but not yet updated in the PT */ 131 /* BOs moved, but not yet updated in the PT */
132 struct list_head invalidated; 132 struct list_head moved;
133 133
134 /* BOs cleared in the PT because of a move */ 134 /* BOs cleared in the PT because of a move */
135 struct list_head cleared; 135 struct list_head cleared;
@@ -247,8 +247,8 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
247int amdgpu_vm_clear_freed(struct amdgpu_device *adev, 247int amdgpu_vm_clear_freed(struct amdgpu_device *adev,
248 struct amdgpu_vm *vm, 248 struct amdgpu_vm *vm,
249 struct dma_fence **fence); 249 struct dma_fence **fence);
250int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, struct amdgpu_vm *vm, 250int amdgpu_vm_clear_moved(struct amdgpu_device *adev, struct amdgpu_vm *vm,
251 struct amdgpu_sync *sync); 251 struct amdgpu_sync *sync);
252int amdgpu_vm_bo_update(struct amdgpu_device *adev, 252int amdgpu_vm_bo_update(struct amdgpu_device *adev,
253 struct amdgpu_bo_va *bo_va, 253 struct amdgpu_bo_va *bo_va,
254 bool clear); 254 bool clear);