aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch
new file mode 100644
index 00000000..f5a74050
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/3794-drm-amd-pp-Add-new-smu-backend-function-smc_table_ma.patch
@@ -0,0 +1,57 @@
+From a9c9a54324b56e5373a01e18b2015a8c8e64a808 Mon Sep 17 00:00:00 2001
+From: Rex Zhu <Rex.Zhu@amd.com>
+Date: Wed, 7 Mar 2018 16:12:05 +0800
+Subject: [PATCH 3794/4131] drm/amd/pp: Add new smu backend function
+ smc_table_manager
+
+Change-Id: Ie879f878a99202d438d9664dc783a590de2fa72c
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
+---
+ drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 +
+ drivers/gpu/drm/amd/powerplay/inc/smumgr.h | 2 ++
+ drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 8 ++++++++
+ 3 files changed, 11 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+index 312fbc3..494f891 100644
+--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
++++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+@@ -237,6 +237,7 @@ struct pp_smumgr_func {
+ bool (*is_dpm_running)(struct pp_hwmgr *hwmgr);
+ bool (*is_hw_avfs_present)(struct pp_hwmgr *hwmgr);
+ int (*update_dpm_settings)(struct pp_hwmgr *hwmgr, void *profile_setting);
++ int (*smc_table_manager)(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool rw); /*rw: true for read, false for write */
+ };
+
+ struct pp_hwmgr_func {
+diff --git a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
+index 19048b0..c2199b8 100644
+--- a/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
++++ b/drivers/gpu/drm/amd/powerplay/inc/smumgr.h
+@@ -100,4 +100,6 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
+
+ extern int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_setting);
+
++extern int smum_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool rw);
++
+ #endif
+diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
+index 68d943d..04c45c2 100644
+--- a/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
++++ b/drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c
+@@ -199,3 +199,11 @@ int smum_update_dpm_settings(struct pp_hwmgr *hwmgr, void *profile_setting)
+
+ return -EINVAL;
+ }
++
++int smum_smc_table_manager(struct pp_hwmgr *hwmgr, uint8_t *table, uint16_t table_id, bool rw)
++{
++ if (hwmgr->smumgr_funcs->smc_table_manager)
++ return hwmgr->smumgr_funcs->smc_table_manager(hwmgr, table, table_id, rw);
++
++ return -EINVAL;
++}
+--
+2.7.4
+