Skip to content

Commit 053499f

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
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>
1 parent 5f3c40e commit 053499f

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,6 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
23682368
union drm_amdgpu_vm *args = data;
23692369
struct amdgpu_device *adev = drm_to_adev(dev);
23702370
struct amdgpu_fpriv *fpriv = filp->driver_priv;
2371-
long timeout = msecs_to_jiffies(2000);
23722371
int r;
23732372

23742373
switch (args->in.op) {
@@ -2380,21 +2379,6 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
23802379
return r;
23812380
break;
23822381
case AMDGPU_VM_OP_UNRESERVE_VMID:
2383-
if (amdgpu_sriov_runtime(adev))
2384-
timeout = 8 * timeout;
2385-
2386-
/* Wait vm idle to make sure the vmid set in SPM_VMID is
2387-
* not referenced anymore.
2388-
*/
2389-
r = amdgpu_bo_reserve(fpriv->vm.root.bo, true);
2390-
if (r)
2391-
return r;
2392-
2393-
r = amdgpu_vm_wait_idle(&fpriv->vm, timeout);
2394-
if (r < 0)
2395-
return r;
2396-
2397-
amdgpu_bo_unreserve(fpriv->vm.root.bo);
23982382
amdgpu_vmid_free_reserved(adev, &fpriv->vm, AMDGPU_GFXHUB_0);
23992383
break;
24002384
default:

0 commit comments

Comments
 (0)