drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 12 Mar 2021 21:00:21 +0000 (16:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Mar 2021 19:26:42 +0000 (15:26 -0400)
The SMU expects CGPG to be enabled when entering S0ix.
with this we can re-enable SMU suspend.

Acked-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

index 7809bd6c50e07f50ec1b3fcefc737f0ea82a0e9b..fa69ce49eac0537527b3b0ba65ee1b30a63570e2 100644 (file)
@@ -2739,8 +2739,7 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev)
 
                /* XXX fix these remaining cases */
                if (adev->in_s0ix &&
-                   (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC || /* breaks suspend */
-                    adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP || /* breaks resume */
+                   (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_PSP || /* breaks resume */
                     adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_GFX))  /* breaks suspend */
                        continue;
 
index 24b19ba7f784d417aaa019d0b12ac320414e1bae..cd905e41080e5332c8c7b638c397dbef3b928ff2 100644 (file)
@@ -1431,7 +1431,8 @@ static int smu_suspend(void *handle)
 
        smu->watermarks_bitmap &= ~(WATERMARKS_LOADED);
 
-       if (smu->is_apu)
+       /* skip CGPG when in S0ix */
+       if (smu->is_apu && !adev->in_s0ix)
                smu_set_gfx_cgpg(&adev->smu, false);
 
        return 0;