Skip to content

Commit 0b7b07c

Browse files
committed
Revert "drm/amdgpu: rework resume handling for display (v2)"
This reverts commit 2daba7d which is commit 73dae65 upstream. The original patch 73dae65 (drm/amdgpu: rework resume handling for display (v2)), was only targeted at kernels 6.11 and newer. It did not apply cleanly to 6.12 so I backported it and it backport landed as 99a02ea ("drm/amdgpu: rework resume handling for display (v2)"), however there was a bug in the backport that was subsequently fixed in 063d380 ("drm/amdgpu: fix backport of commit 73dae65"). None of this was intended for kernels older than 6.11, however the original backport eventually landed in 6.6, 6.1, and 5.15. Please revert the change from kernels 6.6, 6.1, and 5.15. Link: https://lore.kernel.org/r/BL1PR12MB5144D5363FCE6F2FD3502534F7E72@BL1PR12MB5144.namprd12.prod.outlook.com Link: https://lore.kernel.org/r/BL1PR12MB51449ADCFBF2314431F8BCFDF7132@BL1PR12MB5144.namprd12.prod.outlook.com Reported-by: Salvatore Bonaccorso <carnil@debian.org> Reported-by: Christian König <christian.koenig@amd.com> Reported-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f47c834 commit 0b7b07c

File tree

1 file changed

+2
-43
lines changed

1 file changed

+2
-43
lines changed

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

Lines changed: 2 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,7 +3172,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
31723172
*
31733173
* @adev: amdgpu_device pointer
31743174
*
3175-
* Second resume function for hardware IPs. The list of all the hardware
3175+
* First resume function for hardware IPs. The list of all the hardware
31763176
* IPs that make up the asic is walked and the resume callbacks are run for
31773177
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
31783178
* functional state after a suspend and updates the software state as
@@ -3190,7 +3190,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
31903190
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
31913191
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
31923192
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
3193-
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE ||
31943193
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
31953194
continue;
31963195
r = adev->ip_blocks[i].version->funcs->resume(adev);
@@ -3205,36 +3204,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
32053204
return 0;
32063205
}
32073206

3208-
/**
3209-
* amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
3210-
*
3211-
* @adev: amdgpu_device pointer
3212-
*
3213-
* Third resume function for hardware IPs. The list of all the hardware
3214-
* IPs that make up the asic is walked and the resume callbacks are run for
3215-
* all DCE. resume puts the hardware into a functional state after a suspend
3216-
* and updates the software state as necessary. This function is also used
3217-
* for restoring the GPU after a GPU reset.
3218-
*
3219-
* Returns 0 on success, negative error code on failure.
3220-
*/
3221-
static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev)
3222-
{
3223-
int i, r;
3224-
3225-
for (i = 0; i < adev->num_ip_blocks; i++) {
3226-
if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw)
3227-
continue;
3228-
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) {
3229-
r = adev->ip_blocks[i].version->funcs->resume(adev);
3230-
if (r)
3231-
return r;
3232-
}
3233-
}
3234-
3235-
return 0;
3236-
}
3237-
32383207
/**
32393208
* amdgpu_device_ip_resume - run resume for hardware IPs
32403209
*
@@ -3261,13 +3230,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
32613230

32623231
r = amdgpu_device_ip_resume_phase2(adev);
32633232

3264-
if (r)
3265-
return r;
3266-
3267-
amdgpu_fence_driver_hw_init(adev);
3268-
3269-
r = amdgpu_device_ip_resume_phase3(adev);
3270-
32713233
return r;
32723234
}
32733235

@@ -4267,6 +4229,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
42674229
dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
42684230
goto exit;
42694231
}
4232+
amdgpu_fence_driver_hw_init(adev);
42704233

42714234
r = amdgpu_device_ip_late_init(adev);
42724235
if (r)
@@ -5036,10 +4999,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
50364999
if (r)
50375000
goto out;
50385001

5039-
r = amdgpu_device_ip_resume_phase3(tmp_adev);
5040-
if (r)
5041-
goto out;
5042-
50435002
if (vram_lost)
50445003
amdgpu_device_fill_reset_magic(tmp_adev);
50455004

0 commit comments

Comments
 (0)