From: Evan Quan Date: Fri, 10 Aug 2018 06:27:56 +0000 (+0800) Subject: drm/amd/powerplay: added voltage boot time calibration X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ff50e15b00b0d107df58d0f95065015196015543;p=openwrt%2Fstaging%2Fblogic.git drm/amd/powerplay: added voltage boot time calibration Run AFLL BTC after upload pptable and before enabling all smu features. Signed-off-by: Evan Quan Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c index d7c4334da250..fb32b28afa66 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c @@ -756,6 +756,11 @@ static int vega20_set_allowed_featuresmask(struct pp_hwmgr *hwmgr) return 0; } +static int vega20_run_btc_afll(struct pp_hwmgr *hwmgr) +{ + return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_RunAfllBtc); +} + static int vega20_enable_all_smu_features(struct pp_hwmgr *hwmgr) { struct vega20_hwmgr *data = @@ -1391,6 +1396,11 @@ static int vega20_enable_dpm_tasks(struct pp_hwmgr *hwmgr) "[EnableDPMTasks] Failed to initialize SMC table!", return result); + result = vega20_run_btc_afll(hwmgr); + PP_ASSERT_WITH_CODE(!result, + "[EnableDPMTasks] Failed to run btc afll!", + return result); + result = vega20_enable_all_smu_features(hwmgr); PP_ASSERT_WITH_CODE(!result, "[EnableDPMTasks] Failed to enable all smu features!",