#define PPSMC_MSG_SetGpuPllDfsForSclk ((uint16_t) 0x300)
#define PPSMC_MSG_Didt_Block_Function ((uint16_t) 0x301)
+#define PPSMC_MSG_EnableZeroRpm ((uint16_t) 0x302)
#define PPSMC_MSG_SetVBITimeout ((uint16_t) 0x306)
hwmgr->thermal_controller.
advanceFanControlParameters.ucTargetTemperature,
NULL);
+
+ if (!result &&
+ (hwmgr->chip_id == CHIP_POLARIS10 ||
+ hwmgr->chip_id == CHIP_POLARIS11 ||
+ hwmgr->chip_id == CHIP_POLARIS12) &&
+ hwmgr->thermal_controller.advanceFanControlParameters.ucEnableZeroRPM &&
+ !PP_CAP(PHM_PlatformCaps_customThermalManagement))
+ result = smum_send_msg_to_smc(hwmgr,
+ PPSMC_MSG_EnableZeroRpm,
+ NULL);
+
hwmgr->fan_ctrl_enabled = true;
return result;
return 0;
}
+static void polaris10_populate_zero_rpm_parameters(struct pp_hwmgr *hwmgr)
+{
+ struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend);
+ SMU74_Discrete_DpmTable *table = &(smu_data->smc_state_table);
+ uint16_t fan_stop_temp =
+ ((uint16_t)hwmgr->thermal_controller.advanceFanControlParameters.ucFanStopTemperature) << 8;
+ uint16_t fan_start_temp =
+ ((uint16_t)hwmgr->thermal_controller.advanceFanControlParameters.ucFanStartTemperature) << 8;
+
+ if (hwmgr->thermal_controller.advanceFanControlParameters.ucEnableZeroRPM) {
+ table->FanStartTemperature = PP_HOST_TO_SMC_US(fan_start_temp);
+ table->FanStopTemperature = PP_HOST_TO_SMC_US(fan_stop_temp);
+ }
+}
+
static int polaris10_populate_svi_load_line(struct pp_hwmgr *hwmgr)
{
struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(hwmgr->smu_backend);
PP_ASSERT_WITH_CODE(0 == result,
"Failed to populate BAPM Parameters!", return result);
+ polaris10_populate_zero_rpm_parameters(hwmgr);
+
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_ClockStretcher)) {
result = polaris10_populate_clock_stretcher_data_table(hwmgr);