Skip to content

Commit be28c52

Browse files
ChristianKoenigAMDheftig
authored andcommitted
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: Christian König <christian.koenig@amd.com> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4258 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cherry-picked-for: https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/issues/164
1 parent 127e151 commit be28c52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static int amdgpu_vmid_grab_reserved(struct amdgpu_vm *vm,
289289
* user of the VMID.
290290
*/
291291
r = amdgpu_sync_fence(&(*id)->active, &job->base.s_fence->finished,
292-
GFP_NOWAIT);
292+
GFP_ATOMIC);
293293
if (r)
294294
return r;
295295

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

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

0 commit comments

Comments
 (0)