aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch
new file mode 100644
index 00000000..864a4b4a
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2415-drm-amdgpu-powerplay-vega20-use-correct-table-index.patch
@@ -0,0 +1,65 @@
+From fa590ff2b548a38948e811a9e3c9207f01e960b3 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexander.deucher@amd.com>
+Date: Thu, 30 May 2019 00:51:44 -0500
+Subject: [PATCH 2415/2940] drm/amdgpu/powerplay/vega20: use correct table
+ index
+
+Use the SMU_* variant so we look up the correct index.
+
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+index 514e40979f19..adf51f9e1e73 100644
+--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
++++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+@@ -1802,7 +1802,7 @@ static int vega20_get_power_profile_mode(struct smu_context *smu, char *buf)
+ /* conv PP_SMC_POWER_PROFILE* to WORKLOAD_PPLIB_*_BIT */
+ workload_type = smu_workload_get_type(smu, i);
+ result = smu_update_table(smu,
+- TABLE_ACTIVITY_MONITOR_COEFF | workload_type << 16,
++ SMU_TABLE_ACTIVITY_MONITOR_COEFF | workload_type << 16,
+ (void *)(&activity_monitor), false);
+ if (result) {
+ pr_err("[%s] Failed to get activity monitor!", __func__);
+@@ -1888,7 +1888,7 @@ static int vega20_set_power_profile_mode(struct smu_context *smu, long *input, u
+
+ if (smu->power_profile_mode == PP_SMC_POWER_PROFILE_CUSTOM) {
+ ret = smu_update_table(smu,
+- TABLE_ACTIVITY_MONITOR_COEFF | WORKLOAD_PPLIB_CUSTOM_BIT << 16,
++ SMU_TABLE_ACTIVITY_MONITOR_COEFF | WORKLOAD_PPLIB_CUSTOM_BIT << 16,
+ (void *)(&activity_monitor), false);
+ if (ret) {
+ pr_err("[%s] Failed to get activity monitor!", __func__);
+@@ -1943,7 +1943,7 @@ static int vega20_set_power_profile_mode(struct smu_context *smu, long *input, u
+ }
+
+ ret = smu_update_table(smu,
+- TABLE_ACTIVITY_MONITOR_COEFF | WORKLOAD_PPLIB_CUSTOM_BIT << 16,
++ SMU_TABLE_ACTIVITY_MONITOR_COEFF | WORKLOAD_PPLIB_CUSTOM_BIT << 16,
+ (void *)(&activity_monitor), true);
+ if (ret) {
+ pr_err("[%s] Failed to set activity monitor!", __func__);
+@@ -2767,7 +2767,7 @@ static int vega20_odn_edit_dpm_table(struct smu_context *smu,
+ break;
+
+ case PP_OD_RESTORE_DEFAULT_TABLE:
+- ret = smu_update_table(smu, TABLE_OVERDRIVE, table_context->overdrive_table, false);
++ ret = smu_update_table(smu, SMU_TABLE_OVERDRIVE, table_context->overdrive_table, false);
+ if (ret) {
+ pr_err("Failed to export over drive table!\n");
+ return ret;
+@@ -2776,7 +2776,7 @@ static int vega20_odn_edit_dpm_table(struct smu_context *smu,
+ break;
+
+ case PP_OD_COMMIT_DPM_TABLE:
+- ret = smu_update_table(smu, TABLE_OVERDRIVE, table_context->overdrive_table, true);
++ ret = smu_update_table(smu, SMU_TABLE_OVERDRIVE, table_context->overdrive_table, true);
+ if (ret) {
+ pr_err("Failed to import over drive table!\n");
+ return ret;
+--
+2.17.1
+