Commit 7364d608 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/pp: implement dpm_get_sclk/mclk for RV

RV implementation was missing these callbacks.  Used
to fetch the clock values for other components.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c4c33517
......@@ -523,12 +523,33 @@ static int rv_dpm_force_dpm_level(struct pp_hwmgr *hwmgr,
static uint32_t rv_dpm_get_mclk(struct pp_hwmgr *hwmgr, bool low)
{
return 0;
struct rv_hwmgr *data;
if (hwmgr == NULL)
return -EINVAL;
data = (struct rv_hwmgr *)(hwmgr->backend);
if (low)
return data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk;
else
return data->clock_vol_info.vdd_dep_on_fclk->entries[
data->clock_vol_info.vdd_dep_on_fclk->count - 1].clk;
}
static uint32_t rv_dpm_get_sclk(struct pp_hwmgr *hwmgr, bool low)
{
return 0;
struct rv_hwmgr *data;
if (hwmgr == NULL)
return -EINVAL;
data = (struct rv_hwmgr *)(hwmgr->backend);
if (low)
return data->gfx_min_freq_limit;
else
return data->gfx_max_freq_limit;
}
static int rv_dpm_patch_boot_state(struct pp_hwmgr *hwmgr,
......
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