Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: move iommu_resume before ip init/resume

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

authored by

James Zhu and committed by
Alex Deucher
f02abeb0 80660084

+12
+12
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 2394 2394 if (r) 2395 2395 goto init_failed; 2396 2396 2397 + r = amdgpu_amdkfd_resume_iommu(adev); 2398 + if (r) 2399 + goto init_failed; 2400 + 2397 2401 r = amdgpu_device_ip_hw_init_phase1(adev); 2398 2402 if (r) 2399 2403 goto init_failed; ··· 3151 3147 static int amdgpu_device_ip_resume(struct amdgpu_device *adev) 3152 3148 { 3153 3149 int r; 3150 + 3151 + r = amdgpu_amdkfd_resume_iommu(adev); 3152 + if (r) 3153 + return r; 3154 3154 3155 3155 r = amdgpu_device_ip_resume_phase1(adev); 3156 3156 if (r) ··· 4609 4601 dev_warn(tmp_adev->dev, "asic atom init failed!"); 4610 4602 } else { 4611 4603 dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n"); 4604 + r = amdgpu_amdkfd_resume_iommu(tmp_adev); 4605 + if (r) 4606 + goto out; 4607 + 4612 4608 r = amdgpu_device_ip_resume_phase1(tmp_adev); 4613 4609 if (r) 4614 4610 goto out;