Skip to content

Commit 8a774fe

Browse files
GaryAmdalexdeucher
authored andcommitted
drm/amdgpu: avoid restore process run into dead loop.
In restore process worker, pinned BO cause update PTE fail, then the function re-schedule the restore_work. This will generate dead loop. Signed-off-by: gaba <gaba@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
1 parent d934e53 commit 8a774fe

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2881,6 +2881,9 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence **ef)
28812881
if (!attachment->is_mapped)
28822882
continue;
28832883

2884+
if (attachment->bo_va->base.bo->tbo.pin_count)
2885+
continue;
2886+
28842887
kfd_mem_dmaunmap_attachment(mem, attachment);
28852888
ret = update_gpuvm_pte(mem, attachment, &sync_obj);
28862889
if (ret) {

0 commit comments

Comments
 (0)