diff options
author | Evan Quan <evan.quan@amd.com> | 2017-09-26 11:43:35 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-06 17:43:40 -0400 |
commit | 2b95315a584f8edd6021af1ce4e6282dd6b8fd9c (patch) | |
tree | e76671f4ff7863c6806353a7a328f015d3f9cf98 /drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | |
parent | d0d9db8864af8dca3bb9586402d6334e5bab8f4d (diff) | |
download | blackbird-op-linux-2b95315a584f8edd6021af1ce4e6282dd6b8fd9c.tar.gz blackbird-op-linux-2b95315a584f8edd6021af1ce4e6282dd6b8fd9c.zip |
drm/amd/powerplay: get raven max/min gfx clocks (v2)
v2: squash in rebase fix (Tom)
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c index 6f0b2e5b68c7..1ba69d65ed8b 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c @@ -421,6 +421,26 @@ static int rv_populate_clock_table(struct pp_hwmgr *hwmgr) rv_get_clock_voltage_dependency_table(hwmgr, &pinfo->vdd_dep_on_phyclk, ARRAY_SIZE(VddPhyClk), &VddPhyClk[0]); + PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr, + PPSMC_MSG_GetMinGfxclkFrequency), + "Attempt to get min GFXCLK Failed!", + return -1); + PP_ASSERT_WITH_CODE(!rv_read_arg_from_smc(hwmgr, + &result), + "Attempt to get min GFXCLK Failed!", + return -1); + rv_data->gfx_min_freq_limit = result * 100; + + PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc(hwmgr, + PPSMC_MSG_GetMaxGfxclkFrequency), + "Attempt to get max GFXCLK Failed!", + return -1); + PP_ASSERT_WITH_CODE(!rv_read_arg_from_smc(hwmgr, + &result), + "Attempt to get max GFXCLK Failed!", + return -1); + rv_data->gfx_max_freq_limit = result * 100; + return 0; } |