diff options
author | Huang Rui <ray.huang@amd.com> | 2016-07-12 10:09:31 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-15 19:34:03 +0300 |
commit | f476852a8cb62f0ebf1631cfb71dda1209b91306 (patch) | |
tree | 93924f52ec480d78fe3f322886863157d737b33f /drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | |
parent | bec5f70dad45f7ad63f97aa0988821532ebeade7 (diff) | |
download | linux-f476852a8cb62f0ebf1631cfb71dda1209b91306.tar.xz |
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: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c index 35bc8a29b773..6c321b0d8a1e 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/processpptables.c @@ -810,6 +810,19 @@ static const ATOM_PPLIB_POWERPLAYTABLE *get_powerplay_table( 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, unsigned long *num_of_entries) |