diff options
| author | monk.liu <[email protected]> | 2015-05-26 07:01:54 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-06-04 01:03:54 +0000 |
| commit | cfe2c9780756b63af695078c110b755876b09dfc (patch) | |
| tree | dfddee7a85eddfd3ec9d3aafe54821c31ecdc424 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amdgpu: max_pde_used usage should be under protect (diff) | |
| download | kernel-cfe2c9780756b63af695078c110b755876b09dfc.tar.gz kernel-cfe2c9780756b63af695078c110b755876b09dfc.zip | |
drm/amdgpu: sync fence of clear_invalids (v2)
bo_va may un-initialized, fix it.
Signed-off-by: monk.liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Reviewed-by: Jammy Zhou <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 |
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, * PTs have to be reserved and mutex must be locked! */ int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, - struct amdgpu_vm *vm) + struct amdgpu_vm *vm, struct amdgpu_sync *sync) { - struct amdgpu_bo_va *bo_va; + struct amdgpu_bo_va *bo_va = NULL; int r; spin_lock(&vm->status_lock); @@ -877,6 +877,8 @@ int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, } spin_unlock(&vm->status_lock); + if (bo_va) + amdgpu_sync_fence(sync, bo_va->last_pt_update); return 0; } |
