drm/amd/pp: Add hwmgr interface for edit dpm table
authorRex Zhu <Rex.Zhu@amd.com>
Thu, 11 Jan 2018 07:02:15 +0000 (15:02 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:18:16 +0000 (14:18 -0500)
Add odn_edit_dpm_table function
points for setting user assigned clock/voltage.

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/include/kgd_pp_interface.h
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h

index 103837c7a48cc0b05b2cbb27f41e650d04fc497f..e35dcd011dcc0291c5057460325bbb09e39de909 100644 (file)
@@ -161,6 +161,13 @@ enum {
        PP_GROUP_MAX
 };
 
+enum PP_OD_DPM_TABLE_COMMAND {
+       PP_OD_EDIT_SCLK_VDDC_TABLE,
+       PP_OD_EDIT_MCLK_VDDC_TABLE,
+       PP_OD_RESTORE_DEFAULT_TABLE,
+       PP_OD_COMMIT_DPM_TABLE
+};
+
 struct pp_states_info {
        uint32_t nums;
        uint32_t states[16];
index 7caab09d14363421735c5bdef7fc715b5e3f9edf..604a7cba67a313db04296c5e875402f24d678cf5 100644 (file)
@@ -345,6 +345,9 @@ struct pp_hwmgr_func {
                                        struct PP_TemperatureRange *range);
        int (*get_power_profile_mode)(struct pp_hwmgr *hwmgr, char *buf);
        int (*set_power_profile_mode)(struct pp_hwmgr *hwmgr, long *input, uint32_t size);
+       int (*odn_edit_dpm_table)(struct pp_hwmgr *hwmgr,
+                                       enum PP_OD_DPM_TABLE_COMMAND type,
+                                       long *input, uint32_t size);
 };
 
 struct pp_table_func {