Skip to content

Commit 8defb4f

Browse files
pixelclusteralexdeucher
authored andcommitted
drm/amdgpu: Forward VMID reservation errors
Otherwise userspace may be fooled into believing it has a reserved VMID when in reality it doesn't, ultimately leading to GPU hangs when SPM is used. Fixes: 80e709e ("drm/amdgpu: add option params to enforce process isolation between graphics and compute") Cc: stable@vger.kernel.org Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Natalie Vock <natalie.vock@gmx.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 40cc2b4 commit 8defb4f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,8 +2916,7 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
29162916
switch (args->in.op) {
29172917
case AMDGPU_VM_OP_RESERVE_VMID:
29182918
/* We only have requirement to reserve vmid from gfxhub */
2919-
amdgpu_vmid_alloc_reserved(adev, vm, AMDGPU_GFXHUB(0));
2920-
break;
2919+
return amdgpu_vmid_alloc_reserved(adev, vm, AMDGPU_GFXHUB(0));
29212920
case AMDGPU_VM_OP_UNRESERVE_VMID:
29222921
amdgpu_vmid_free_reserved(adev, vm, AMDGPU_GFXHUB(0));
29232922
break;

0 commit comments

Comments
 (0)