Skip to content

Commit 4021229

Browse files
committed
drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend
The SMU expects CGPG to be enabled when entering S0ix. with this we can re-enable SMU suspend. Acked-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 9adb125 commit 4021229

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2739,8 +2739,7 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
27392739

27402740
/* XXX fix these remaining cases */
27412741
if (adev->in_s0ix &&
2742-
(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC || /* breaks suspend */
2743-
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP || /* breaks resume */
2742+
(adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP || /* breaks resume */
27442743
adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX)) /* breaks suspend */
27452744
continue;
27462745

drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,8 @@ static int smu_suspend(void *handle)
14311431

14321432
smu->watermarks_bitmap &= ~(WATERMARKS_LOADED);
14331433

1434-
if (smu->is_apu)
1434+
/* skip CGPG when in S0ix */
1435+
if (smu->is_apu && !adev->in_s0ix)
14351436
smu_set_gfx_cgpg(&adev->smu, false);
14361437

14371438
return 0;

0 commit comments

Comments
 (0)