aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authormonk.liu <monk.liu@amd.com>2015-05-26 03:01:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-06-03 21:03:54 -0400
commitcfe2c9780756b63af695078c110b755876b09dfc (patch)
treedfddee7a85eddfd3ec9d3aafe54821c31ecdc424 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent3d5a08c114585e5b9f890807b04d2730dafde5e1 (diff)
drm/amdgpu: sync fence of clear_invalids (v2)
bo_va may un-initialized, fix it. Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index dcb2d3859cf1..4d26b303b495 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -858,9 +858,9 @@ int amdgpu_vm_clear_freed(struct amdgpu_device *adev,
858 * PTs have to be reserved and mutex must be locked! 858 * PTs have to be reserved and mutex must be locked!
859 */ 859 */
860int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, 860int amdgpu_vm_clear_invalids(struct amdgpu_device *adev,
861 struct amdgpu_vm *vm) 861 struct amdgpu_vm *vm, struct amdgpu_sync *sync)
862{ 862{
863 struct amdgpu_bo_va *bo_va; 863 struct amdgpu_bo_va *bo_va = NULL;
864 int r; 864 int r;
865 865
866 spin_lock(&vm->status_lock); 866 spin_lock(&vm->status_lock);
@@ -877,6 +877,8 @@ int amdgpu_vm_clear_invalids(struct amdgpu_device *adev,
877 } 877 }
878 spin_unlock(&vm->status_lock); 878 spin_unlock(&vm->status_lock);
879 879
880 if (bo_va)
881 amdgpu_sync_fence(sync, bo_va->last_pt_update);
880 return 0; 882 return 0;
881} 883}
882 884