summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-09-25 14:36:09 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-10-27 12:00:15 -0400
commit9182fefcb8ca599e1ecc6b308ebf9695ba439901 (patch)
treeaf3528752d4aaf9728a5de5c69c6e171e9fe986a
parent8f97e221d64d76b8c80b5fa6b41a9a77b8ab1c9f (diff)
downloadcachepc-linux-9182fefcb8ca599e1ecc6b308ebf9695ba439901.tar.gz
cachepc-linux-9182fefcb8ca599e1ecc6b308ebf9695ba439901.zip
drm/amd/pm: correct SMC sclk/mclk boot level setup
Correct Polaris smc boot level setup. Signed-off-by: Evan Quan <evan.quan@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
index 47230d8fb592..d4253b1116c2 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c
@@ -1587,10 +1587,18 @@ static int polaris10_populate_smc_boot_level(struct pp_hwmgr *hwmgr,
result = phm_find_boot_level(&(data->dpm_table.sclk_table),
data->vbios_boot_state.sclk_bootup_value,
(uint32_t *)&(table->GraphicsBootLevel));
+ if (result) {
+ table->GraphicsBootLevel = 0;
+ result = 0;
+ }
result = phm_find_boot_level(&(data->dpm_table.mclk_table),
data->vbios_boot_state.mclk_bootup_value,
(uint32_t *)&(table->MemoryBootLevel));
+ if (result) {
+ table->MemoryBootLevel = 0;
+ result = 0;
+ }
table->BootVddc = data->vbios_boot_state.vddc_bootup_value *
VOLTAGE_SCALE;