drm/amd/powerplay: set fan target temperature by msg on vega10.
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 2 May 2017 09:11:29 +0000 (17:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 5 May 2017 22:11:52 +0000 (18:11 -0400)
SMU not support FanTargetTemperature in pptable,
so send msg instand.

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_thermal.c

index 7062ec8cc4ac8cb928aaf2ff9c8ff3b30e805c13..5da88ba4a53c94a9d522b7d57397b724117b44e5 100644 (file)
@@ -561,6 +561,11 @@ int tf_vega10_thermal_setup_fan_table(struct pp_hwmgr *hwmgr,
                        advanceFanControlParameters.ulMinFanSCLKAcousticLimit);
        table->FanTargetTemperature = hwmgr->thermal_controller.
                        advanceFanControlParameters.usTMax;
+
+       smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
+                               PPSMC_MSG_SetFanTemperatureTarget,
+                               (uint32_t)table->FanTargetTemperature);
+
        table->FanPwmMin = hwmgr->thermal_controller.
                        advanceFanControlParameters.usPWMMin * 255 / 100;
        table->FanTargetGfxclk = (uint16_t)(hwmgr->thermal_controller.