summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-06-08 19:39:42 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-06-21 10:22:41 -0400
commit432c3a3ca794bd2301425cb58bf097fc26690c17 (patch)
tree3437d9bbdab1c1c715da00746953198eec0c1cc6 /drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c
parentc11cb70483c33404d1c0cf9aa48e7627eecbe14d (diff)
downloadop-kernel-dev-432c3a3ca794bd2301425cb58bf097fc26690c17.zip
op-kernel-dev-432c3a3ca794bd2301425cb58bf097fc26690c17.tar.gz
drm/amd/powerplay: enable avfs feature for polaris
avfs feature is for voltage control based on gpu system clock on polaris10 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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c
index aba167f..b206632 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_thermal.c
@@ -625,10 +625,14 @@ static int tf_polaris10_thermal_avfs_enable(struct pp_hwmgr *hwmgr,
int ret;
struct pp_smumgr *smumgr = (struct pp_smumgr *)(hwmgr->smumgr);
struct polaris10_smumgr *smu_data = (struct polaris10_smumgr *)(smumgr->backend);
+ struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);
- if (smu_data->avfs.avfs_btc_status != AVFS_BTC_ENABLEAVFS)
+ if (smu_data->avfs.avfs_btc_status == AVFS_BTC_NOTSUPPORTED)
return 0;
+ ret = smum_send_msg_to_smc_with_parameter(hwmgr->smumgr,
+ PPSMC_MSG_SetGBDroopSettings, data->avfs_vdroop_override_setting);
+
ret = (smum_send_msg_to_smc(smumgr, PPSMC_MSG_EnableAvfs) == 0) ?
0 : -1;
OpenPOWER on IntegriCloud