aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch
new file mode 100644
index 00000000..af53c02c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-4.19/linux-yocto-4.19.8/1363-drm-amd-powerplay-implement-read_pptable_from_vbios-.patch
@@ -0,0 +1,66 @@
+From 78c48feeceb528ae462e24460168b34a9cd0667c Mon Sep 17 00:00:00 2001
+From: Huang Rui <ray.huang@amd.com>
+Date: Fri, 14 Dec 2018 17:47:20 +0800
+Subject: [PATCH 1363/2940] drm/amd/powerplay: implement
+ read_pptable_from_vbios function for smu11
+
+This patch implements the function of read_pptable_from_vbios for smu11.
+
+Signed-off-by: Huang Rui <ray.huang@amd.com>
+Reviewed-by: Kevin Wang <Kevin1.Wang@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23 +++++++++++++++++++++++
+ 1 file changed, 23 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+index a2a0ee10f774..efc3e4bcb41d 100644
+--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
++++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+@@ -25,6 +25,7 @@
+ #include "amdgpu.h"
+ #include "amdgpu_smu.h"
+ #include "atomfirmware.h"
++#include "amdgpu_atomfirmware.h"
+ #include "smu_v11_0.h"
+ #include "smu_v11_0_ppsmc.h"
+ #include "smu11_driver_if.h"
+@@ -212,6 +213,27 @@ static int smu_v11_0_check_fw_version(struct smu_context *smu)
+ return ret;
+ }
+
++static int smu_v11_0_read_pptable_from_vbios(struct smu_context *smu)
++{
++ int ret, index;
++ uint16_t size;
++ uint8_t frev, crev;
++ struct smu_11_0_powerplay_table *table;
++
++ index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
++ powerplayinfo);
++
++ ret = smu_get_atom_data_table(smu, index, &size, &frev, &crev,
++ (uint8_t **)&table);
++ if (ret)
++ return ret;
++
++ smu->smu_table.power_play_table = table;
++ smu->smu_table.power_play_table_size = size;
++
++ return 0;
++}
++
+ static const struct smu_funcs smu_v11_0_funcs = {
+ .init_microcode = smu_v11_0_init_microcode,
+ .load_microcode = smu_v11_0_load_microcode,
+@@ -219,6 +241,7 @@ static const struct smu_funcs smu_v11_0_funcs = {
+ .check_fw_version = smu_v11_0_check_fw_version,
+ .send_smc_msg = smu_v11_0_send_msg,
+ .send_smc_msg_with_param = smu_v11_0_send_msg_with_param,
++ .read_pptable_from_vbios = smu_v11_0_read_pptable_from_vbios,
+ };
+
+ void smu_v11_0_set_smu_funcs(struct smu_context *smu)
+--
+2.17.1
+