diff options
| author | Xiaogang Chen <xiaogang.chen@amd.com> | 2023-06-19 16:17:02 -0500 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-30 13:11:35 -0400 | 
| commit | 1d7776cc148b9f2f3ebaf1181662ba695a29f639 (patch) | |
| tree | 33e07c4bb89cead81ec668a4af430b079b9b6476 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | 072030b1783056b5de8b0fac5303a5e9dbc6cfde (diff) | |
drm/amdgpu: remove vm sanity check from amdgpu_vm_make_compute
Since we allow kfd and graphic operate on same GPU VM to have interoperation
between them GPU VM may have been used by graphic vm operations before kfd turns
a GPU VM into a compute VM. Remove vm clean checking at amdgpu_vm_make_compute.
Signed-off-by: Xiaogang Chen <xiaogang.chen@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index eff73c428b12..291977b93b1d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -2245,16 +2245,16 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm)  	if (r)  		return r; -	/* Sanity checks */ -	if (!amdgpu_vm_pt_is_root_clean(adev, vm)) { -		r = -EINVAL; -		goto unreserve_bo; -	} -  	/* Check if PD needs to be reinitialized and do it before  	 * changing any other state, in case it fails.  	 */  	if (pte_support_ats != vm->pte_support_ats) { +		/* Sanity checks */ +		if (!amdgpu_vm_pt_is_root_clean(adev, vm)) { +			r = -EINVAL; +			goto unreserve_bo; +		} +  		vm->pte_support_ats = pte_support_ats;  		r = amdgpu_vm_pt_clear(adev, vm, to_amdgpu_bo_vm(vm->root.bo),  				       false); | 
