]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
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>
Fri, 9 Apr 2021 20:36:57 +0000 (16:36 -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 6a1416cb1378c915b36ae5a20c9df0690dbe0942..5ec9b8793ae51294f72a37c59de614823b7dbf2e 100644 (file)
@@ -2756,8 +2756,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 cfcac110ed84db710acf4636405b07a5ee2b82d4..143e3783251e8bf110a3d28f2b9b398abd328b1a 100644 (file)
@@ -1474,7 +1474,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;