drm/amd/pp: Add new smu backend function smc_table_manager
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 7 Mar 2018 08:12:05 +0000 (16:12 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Mar 2018 14:56:44 +0000 (09:56 -0500)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
drivers/gpu/drm/amd/powerplay/inc/smumgr.h
drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c

index 312fbc3..494f891 100644 (file)
@@ -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 {
index 19048b0..c2199b8 100644 (file)
@@ -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
index 68d943d..04c45c2 100644 (file)
@@ -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;
+}