Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: stop waiting for the VM during unreserve

This is completely pointless since the VMID always stays allocated until
the VM is idle.

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>

authored by

Christian König and committed by
Alex Deucher
053499f7 5f3c40e9

-16
-16
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
··· 2368 2368 union drm_amdgpu_vm *args = data; 2369 2369 struct amdgpu_device *adev = drm_to_adev(dev); 2370 2370 struct amdgpu_fpriv *fpriv = filp->driver_priv; 2371 - long timeout = msecs_to_jiffies(2000); 2372 2371 int r; 2373 2372 2374 2373 switch (args->in.op) { ··· 2379 2380 return r; 2380 2381 break; 2381 2382 case AMDGPU_VM_OP_UNRESERVE_VMID: 2382 - if (amdgpu_sriov_runtime(adev)) 2383 - timeout = 8 * timeout; 2384 - 2385 - /* Wait vm idle to make sure the vmid set in SPM_VMID is 2386 - * not referenced anymore. 2387 - */ 2388 - r = amdgpu_bo_reserve(fpriv->vm.root.bo, true); 2389 - if (r) 2390 - return r; 2391 - 2392 - r = amdgpu_vm_wait_idle(&fpriv->vm, timeout); 2393 - if (r < 0) 2394 - return r; 2395 - 2396 - amdgpu_bo_unreserve(fpriv->vm.root.bo); 2397 2383 amdgpu_vmid_free_reserved(adev, &fpriv->vm, AMDGPU_GFXHUB_0); 2398 2384 break; 2399 2385 default: