Skip to content

Commit 8c45096

Browse files
Prike Liangalexdeucher
authored andcommitted
drm/amd/pm: skip setting gfx cgpg in the s0ix suspend-resume
In the s0ix entry need retain gfx in the gfxoff state,so here need't set gfx cgpg in the S0ix suspend-resume process. Moreover move the S0ix check into SMU12 can simplify the code condition check. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1712 Signed-off-by: Prike Liang <[email protected]> Reviewed-by: Evan Quan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4d625a9 commit 8c45096

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,9 +1568,7 @@ static int smu_suspend(void *handle)
15681568

15691569
smu->watermarks_bitmap &= ~(WATERMARKS_LOADED);
15701570

1571-
/* skip CGPG when in S0ix */
1572-
if (smu->is_apu && !adev->in_s0ix)
1573-
smu_set_gfx_cgpg(&adev->smu, false);
1571+
smu_set_gfx_cgpg(&adev->smu, false);
15741572

15751573
return 0;
15761574
}
@@ -1601,8 +1599,7 @@ static int smu_resume(void *handle)
16011599
return ret;
16021600
}
16031601

1604-
if (smu->is_apu)
1605-
smu_set_gfx_cgpg(&adev->smu, true);
1602+
smu_set_gfx_cgpg(&adev->smu, true);
16061603

16071604
smu->disable_uclk_switch = 0;
16081605

drivers/gpu/drm/amd/pm/swsmu/smu12/smu_v12_0.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ int smu_v12_0_powergate_sdma(struct smu_context *smu, bool gate)
120120

121121
int smu_v12_0_set_gfx_cgpg(struct smu_context *smu, bool enable)
122122
{
123-
if (!(smu->adev->pg_flags & AMD_PG_SUPPORT_GFX_PG))
123+
/* Until now the SMU12 only implemented for Renoir series so here neen't do APU check. */
124+
if (!(smu->adev->pg_flags & AMD_PG_SUPPORT_GFX_PG) || smu->adev->in_s0ix)
124125
return 0;
125126

126127
return smu_cmn_send_smc_msg_with_param(smu,

0 commit comments

Comments
 (0)