summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2021-05-13 16:21:23 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-05-19 22:38:20 -0400
commit5709121a58a21e0bbde362536ec456f1a64c4ec4 (patch)
tree50a8f5f42611edd3ade2d542c9545a49a8a02fc6 /drivers/gpu/drm/amd/pm
parente943dd8861f70785fa862ba699c7f3ba22811609 (diff)
downloadlinux-stable-5709121a58a21e0bbde362536ec456f1a64c4ec4.tar.gz
linux-stable-5709121a58a21e0bbde362536ec456f1a64c4ec4.tar.bz2
linux-stable-5709121a58a21e0bbde362536ec456f1a64c4ec4.zip
drm/amd/pm: Reset max GFX clock after disabling determinism
When determinism mode is disabled on aldebaran, max GFX clock will be reset to default max frequency value. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Kevin Wang <kevin1.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index b14e587186c9..7c191a5d6db9 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1129,12 +1129,17 @@ static int aldebaran_set_performance_level(struct smu_context *smu,
enum amd_dpm_forced_level level)
{
struct smu_dpm_context *smu_dpm = &(smu->smu_dpm);
+ struct smu_13_0_dpm_context *dpm_context = smu_dpm->dpm_context;
+ struct smu_13_0_dpm_table *gfx_table =
+ &dpm_context->dpm_tables.gfx_table;
+ struct smu_umd_pstate_table *pstate_table = &smu->pstate_table;
/* Disable determinism if switching to another mode */
- if ((smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)
- && (level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM))
+ if ((smu_dpm->dpm_level == AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM) &&
+ (level != AMD_DPM_FORCED_LEVEL_PERF_DETERMINISM)) {
smu_cmn_send_smc_msg(smu, SMU_MSG_DisableDeterminism, NULL);
-
+ pstate_table->gfxclk_pstate.curr.max = gfx_table->max;
+ }
switch (level) {