Commit 991a4343 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: use GFP_ATOMIC instead of NOWAIT in the critical path



Otherwise job submissions can fail with ENOMEM.

We probably need to re-design the per VMID tracking at some point.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4258


Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 20459c09
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ static int amdgpu_vmid_grab_reserved(struct amdgpu_vm *vm,
	* user of the VMID.
	*/
	r = amdgpu_sync_fence(&(*id)->active, &job->base.s_fence->finished,
			      GFP_NOWAIT);
			      GFP_ATOMIC);
	if (r)
		return r;

@@ -349,7 +349,7 @@ static int amdgpu_vmid_grab_used(struct amdgpu_vm *vm,
		 */
		r = amdgpu_sync_fence(&(*id)->active,
				      &job->base.s_fence->finished,
				      GFP_NOWAIT);
				      GFP_ATOMIC);
		if (r)
			return r;

@@ -402,7 +402,7 @@ int amdgpu_vmid_grab(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
			/* Remember this submission as user of the VMID */
			r = amdgpu_sync_fence(&id->active,
					      &job->base.s_fence->finished,
					      GFP_NOWAIT);
					      GFP_ATOMIC);
			if (r)
				goto error;