]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/pm: correct SMC sclk/mclk boot level setup
authorEvan Quan <evan.quan@amd.com>
Fri, 25 Sep 2020 06:36:09 +0000 (14:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 27 Oct 2020 16:00:15 +0000 (12:00 -0400)
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>
drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c

index 47230d8fb592c8b7e1c7f0b58498bd4b84ae4e09..d4253b1116c2e7bcd9c5b0b24dab36f89256dfe6 100644 (file)
@@ -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;