Commit 8defb4f0 authored by Natalie Vock's avatar Natalie Vock Committed by Alex Deucher
Browse files

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: 80e709ee ("drm/amdgpu: add option params to enforce process isolation between graphics and compute")
Cc: stable@vger.kernel.org
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarNatalie Vock <natalie.vock@gmx.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 40cc2b42
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2916,8 +2916,7 @@ int amdgpu_vm_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
	switch (args->in.op) {
	case AMDGPU_VM_OP_RESERVE_VMID:
		/* We only have requirement to reserve vmid from gfxhub */
		amdgpu_vmid_alloc_reserved(adev, vm, AMDGPU_GFXHUB(0));
		break;
		return amdgpu_vmid_alloc_reserved(adev, vm, AMDGPU_GFXHUB(0));
	case AMDGPU_VM_OP_UNRESERVE_VMID:
		amdgpu_vmid_free_reserved(adev, vm, AMDGPU_GFXHUB(0));
		break;