diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-01-29 13:04:18 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-02-19 22:19:44 +0300 |
commit | 6ab8555e04ecd2278fdca54c33a7ddac7d4ba5d2 (patch) | |
tree | f58109e970b10a250fdfdbbd57a3f4b4bac6a6a0 /drivers/gpu/drm/amd/powerplay/inc | |
parent | 71d0a89812c9749fbb48c633f91512d51433989e (diff) | |
download | linux-6ab8555e04ecd2278fdca54c33a7ddac7d4ba5d2.tar.xz |
drm/amd/pp: Expose set/get_power_limit for DGPU
User can change power limit between
[0, 1] * max power limit.
Set power limit to 0, restore to max power limit.
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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h index 4d96439dd989..c0f9cea08339 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h @@ -347,6 +347,7 @@ struct pp_hwmgr_func { int (*odn_edit_dpm_table)(struct pp_hwmgr *hwmgr, enum PP_OD_DPM_TABLE_COMMAND type, long *input, uint32_t size); + int (*set_power_limit)(struct pp_hwmgr *hwmgr, uint32_t n); int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr *hwmgr); }; @@ -759,6 +760,8 @@ struct pp_hwmgr { uint32_t pstate_sclk; uint32_t pstate_mclk; bool od_enabled; + uint32_t power_limit; + uint32_t default_power_limit; }; struct cgs_irq_src_funcs { |