Skip to content

Commit f02abeb

Browse files
jameszhu-amdalexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 8066008 commit f02abeb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2394,6 +2394,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
23942394
if (r)
23952395
goto init_failed;
23962396

2397+
r = amdgpu_amdkfd_resume_iommu(adev);
2398+
if (r)
2399+
goto init_failed;
2400+
23972401
r = amdgpu_device_ip_hw_init_phase1(adev);
23982402
if (r)
23992403
goto init_failed;
@@ -3148,6 +3152,10 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
31483152
{
31493153
int r;
31503154

3155+
r = amdgpu_amdkfd_resume_iommu(adev);
3156+
if (r)
3157+
return r;
3158+
31513159
r = amdgpu_device_ip_resume_phase1(adev);
31523160
if (r)
31533161
return r;
@@ -4601,6 +4609,10 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
46014609
dev_warn(tmp_adev->dev, "asic atom init failed!");
46024610
} else {
46034611
dev_info(tmp_adev->dev, "GPU reset succeeded, trying to resume\n");
4612+
r = amdgpu_amdkfd_resume_iommu(tmp_adev);
4613+
if (r)
4614+
goto out;
4615+
46044616
r = amdgpu_device_ip_resume_phase1(tmp_adev);
46054617
if (r)
46064618
goto out;

0 commit comments

Comments
 (0)