aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch
new file mode 100644
index 00000000..4a91bbc4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2358-drm-amd-powerplay-add-function-set_thermal_fan_table.patch
@@ -0,0 +1,49 @@
+From a6f939fc17db2103df0cd3b57d8969ac9735b145 Mon Sep 17 00:00:00 2001
+From: Kevin Wang <kevin1.wang@amd.com>
+Date: Tue, 23 Apr 2019 13:05:27 +0800
+Subject: [PATCH 2358/2940] drm/amd/powerplay: add function
+ set_thermal_fan_table for navi10
+
+add callback function set_thermal_fan_table for navi10 asic
+
+Signed-off-by:Kevin Wang <kevin1.wang@amd.com>
+Reviewed-by: Huang Rui <ray.huang@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+index f98f1c6a9429..fd796322fe35 100644
+--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
++++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c
+@@ -807,6 +807,18 @@ static bool navi10_is_dpm_running(struct smu_context *smu)
+ return !!(feature_enabled & SMC_DPM_FEATURE);
+ }
+
++static int navi10_set_thermal_fan_table(struct smu_context *smu)
++{
++ int ret;
++ struct smu_table_context *table_context = &smu->smu_table;
++ PPTable_t *pptable = table_context->driver_pptable;
++
++ ret = smu_send_smc_msg_with_param(smu, SMU_MSG_SetFanTemperatureTarget,
++ (uint32_t)pptable->FanTargetTemperature);
++
++ return ret;
++}
++
+ static const struct pptable_funcs navi10_ppt_funcs = {
+ .tables_init = navi10_tables_init,
+ .alloc_dpm_context = navi10_allocate_dpm_context,
+@@ -833,6 +845,7 @@ static const struct pptable_funcs navi10_ppt_funcs = {
+ .get_gpu_power = navi10_get_gpu_power,
+ .get_current_activity_percent = navi10_get_current_activity_percent,
+ .is_dpm_running = navi10_is_dpm_running,
++ .set_thermal_fan_table = navi10_set_thermal_fan_table,
+ };
+
+ void navi10_set_ppt_funcs(struct smu_context *smu)
+--
+2.17.1
+