Skip to content

Commit

Permalink
drm/amdgpu: move iommu_resume before ip init/resume
Browse files Browse the repository at this point in the history
commit f02abeb upstream.

Separate iommu_resume from kfd_resume, and move it before
other amdgpu ip init/resume.

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211277
Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
James Zhu authored and gregkh committed Sep 22, 2021
1 parent 64ca717 commit 413a864
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Expand Up @@ -2342,6 +2342,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
if (r)
goto init_failed;

r = amdgpu_amdkfd_resume_iommu(adev);
if (r)
goto init_failed;

r = amdgpu_device_ip_hw_init_phase1(adev);
if (r)
goto init_failed;
Expand Down Expand Up @@ -3096,6 +3100,10 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
{
int r;

r = amdgpu_amdkfd_resume_iommu(adev);
if (r)
return r;

r = amdgpu_device_ip_resume_phase1(adev);
if (r)
return r;
Expand Down Expand Up @@ -4534,6 +4542,10 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
dev_warn(tmp_adev->dev, "asic atom init failed!");
} else {
dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n");
r = amdgpu_amdkfd_resume_iommu(tmp_adev);
if (r)
goto out;

r = amdgpu_device_ip_resume_phase1(tmp_adev);
if (r)
goto out;
Expand Down

0 comments on commit 413a864

Please sign in to comment.