aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch
new file mode 100644
index 00000000..5270d2a6
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/5148-drm-amd-powerplay-added-voltage-boot-time-calibratio.patch
@@ -0,0 +1,47 @@
+From eb099c1dc4267f8ec5e8d194b5f8d87ea717ff1c Mon Sep 17 00:00:00 2001
+From: Evan Quan <evan.quan@amd.com>
+Date: Fri, 10 Aug 2018 14:27:56 +0800
+Subject: [PATCH 5148/5725] 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 <evan.quan@amd.com>
+Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+index d7c4334..fb32b28 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!",
+--
+2.7.4
+