Skip to content

Commit e773603

Browse files
committed
Revert "drm/amdgpu: rework resume handling for display (v2)"
This reverts commit c807ab3 which is commit 73dae652dcac776296890da215ee7dec357a1032 upstream. The original patch 73dae652dcac (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 99a02eab8251 ("drm/amdgpu: rework resume handling for display (v2)"), however there was a bug in the backport that was subsequently fixed in 063d380ca28e ("drm/amdgpu: fix backport of commit 73dae652dcac"). 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 <[email protected]> Reported-by: Christian König <[email protected]> Reported-by: Alex Deucher <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1921fe7 commit e773603

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
@@ -3242,7 +3242,7 @@ static int amdgpu_device_ip_resume_phase1(struct amdgpu_device *adev)
32423242
*
32433243
* @adev: amdgpu_device pointer
32443244
*
3245-
* Second resume function for hardware IPs. The list of all the hardware
3245+
* First resume function for hardware IPs. The list of all the hardware
32463246
* IPs that make up the asic is walked and the resume callbacks are run for
32473247
* all blocks except COMMON, GMC, and IH. resume puts the hardware into a
32483248
* functional state after a suspend and updates the software state as
@@ -3260,7 +3260,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
32603260
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON ||
32613261
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GMC ||
32623262
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_IH ||
3263-
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE ||
32643263
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP)
32653264
continue;
32663265
r = adev->ip_blocks[i].version->funcs->resume(adev);
@@ -3284,36 +3283,6 @@ static int amdgpu_device_ip_resume_phase2(struct amdgpu_device *adev)
32843283
return 0;
32853284
}
32863285

3287-
/**
3288-
* amdgpu_device_ip_resume_phase3 - run resume for hardware IPs
3289-
*
3290-
* @adev: amdgpu_device pointer
3291-
*
3292-
* Third resume function for hardware IPs. The list of all the hardware
3293-
* IPs that make up the asic is walked and the resume callbacks are run for
3294-
* all DCE. resume puts the hardware into a functional state after a suspend
3295-
* and updates the software state as necessary. This function is also used
3296-
* for restoring the GPU after a GPU reset.
3297-
*
3298-
* Returns 0 on success, negative error code on failure.
3299-
*/
3300-
static int amdgpu_device_ip_resume_phase3(struct amdgpu_device *adev)
3301-
{
3302-
int i, r;
3303-
3304-
for (i = 0; i < adev->num_ip_blocks; i++) {
3305-
if (!adev->ip_blocks[i].status.valid || adev->ip_blocks[i].status.hw)
3306-
continue;
3307-
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_DCE) {
3308-
r = adev->ip_blocks[i].version->funcs->resume(adev);
3309-
if (r)
3310-
return r;
3311-
}
3312-
}
3313-
3314-
return 0;
3315-
}
3316-
33173286
/**
33183287
* amdgpu_device_ip_resume - run resume for hardware IPs
33193288
*
@@ -3344,13 +3313,6 @@ static int amdgpu_device_ip_resume(struct amdgpu_device *adev)
33443313

33453314
r = amdgpu_device_ip_resume_phase2(adev);
33463315

3347-
if (r)
3348-
return r;
3349-
3350-
amdgpu_fence_driver_hw_init(adev);
3351-
3352-
r = amdgpu_device_ip_resume_phase3(adev);
3353-
33543316
return r;
33553317
}
33563318

@@ -4349,6 +4311,7 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
43494311
dev_err(adev->dev, "amdgpu_device_ip_resume failed (%d).\n", r);
43504312
return r;
43514313
}
4314+
amdgpu_fence_driver_hw_init(adev);
43524315

43534316
r = amdgpu_device_ip_late_init(adev);
43544317
if (r)
@@ -5102,10 +5065,6 @@ int amdgpu_do_asic_reset(struct list_head *device_list_handle,
51025065
if (r)
51035066
goto out;
51045067

5105-
r = amdgpu_device_ip_resume_phase3(tmp_adev);
5106-
if (r)
5107-
goto out;
5108-
51095068
if (vram_lost)
51105069
amdgpu_device_fill_reset_magic(tmp_adev);
51115070

0 commit comments

Comments
 (0)