diff options
author | gaba <gaba@amd.com> | 2023-03-02 19:03:56 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-07-12 12:07:13 -0400 |
commit | 8a774fe912ff09e39c2d3a3589c729330113f388 (patch) | |
tree | 7063d3d7fdce8a811c858930ddfaac9281d11cf1 /drivers/gpu | |
parent | d934e537c14bfe1227ced6341472571f354383e8 (diff) | |
download | lwn-8a774fe912ff09e39c2d3a3589c729330113f388.tar.gz lwn-8a774fe912ff09e39c2d3a3589c729330113f388.zip |
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
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c index f61527b800e6..a7f314ddd173 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c @@ -2881,6 +2881,9 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info, struct dma_fence **ef) if (!attachment->is_mapped) continue; + if (attachment->bo_va->base.bo->tbo.pin_count) + continue; + kfd_mem_dmaunmap_attachment(mem, attachment); ret = update_gpuvm_pte(mem, attachment, &sync_obj); if (ret) { |