Commit f476852a authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: add pp_tables_get_response_times function in process pptables

The pp_tables_get_response_times function will be used on iceland HW
mananger.
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bec5f70d
...@@ -810,6 +810,19 @@ static const ATOM_PPLIB_POWERPLAYTABLE *get_powerplay_table( ...@@ -810,6 +810,19 @@ static const ATOM_PPLIB_POWERPLAYTABLE *get_powerplay_table(
return (const ATOM_PPLIB_POWERPLAYTABLE *)table_addr; return (const ATOM_PPLIB_POWERPLAYTABLE *)table_addr;
} }
int pp_tables_get_response_times(struct pp_hwmgr *hwmgr,
uint32_t *vol_rep_time, uint32_t *bb_rep_time)
{
const ATOM_PPLIB_POWERPLAYTABLE *powerplay_tab = get_powerplay_table(hwmgr);
PP_ASSERT_WITH_CODE(NULL != powerplay_tab,
"Missing PowerPlay Table!", return -EINVAL);
*vol_rep_time = (uint32_t)le16_to_cpu(powerplay_tab->usVoltageTime);
*bb_rep_time = (uint32_t)le16_to_cpu(powerplay_tab->usBackbiasTime);
return 0;
}
int pp_tables_get_num_of_entries(struct pp_hwmgr *hwmgr, int pp_tables_get_num_of_entries(struct pp_hwmgr *hwmgr,
unsigned long *num_of_entries) unsigned long *num_of_entries)
......
...@@ -44,4 +44,7 @@ int pp_tables_get_entry(struct pp_hwmgr *hwmgr, ...@@ -44,4 +44,7 @@ int pp_tables_get_entry(struct pp_hwmgr *hwmgr,
struct pp_power_state *ps, struct pp_power_state *ps,
pp_tables_hw_clock_info_callback func); pp_tables_hw_clock_info_callback func);
int pp_tables_get_response_times(struct pp_hwmgr *hwmgr,
uint32_t *vol_rep_time, uint32_t *bb_rep_time);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment