Commit fa51bfc2 authored by Kevin Wang's avatar Kevin Wang Committed by Alex Deucher

drm/amd/powerplay: add function populate_umd_state_clk for navi10

add callback function populate_umd_state_clk for navi10 asic
Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
Reviewed-by: default avatarHuang Rui <ray.huang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent db439ca2
...@@ -602,6 +602,20 @@ static int navi10_force_clk_levels(struct smu_context *smu, ...@@ -602,6 +602,20 @@ static int navi10_force_clk_levels(struct smu_context *smu,
return size; return size;
} }
static int navi10_populate_umd_state_clk(struct smu_context *smu)
{
int ret = 0;
uint32_t min_sclk_freq = 0;
ret = smu_get_dpm_freq_range(smu, SMU_SCLK, &min_sclk_freq, NULL);
if (ret)
return ret;
smu->pstate_sclk = min_sclk_freq * 100;
return ret;
}
static const struct pptable_funcs navi10_ppt_funcs = { static const struct pptable_funcs navi10_ppt_funcs = {
.tables_init = navi10_tables_init, .tables_init = navi10_tables_init,
.alloc_dpm_context = navi10_allocate_dpm_context, .alloc_dpm_context = navi10_allocate_dpm_context,
...@@ -619,6 +633,7 @@ static const struct pptable_funcs navi10_ppt_funcs = { ...@@ -619,6 +633,7 @@ static const struct pptable_funcs navi10_ppt_funcs = {
.get_current_clk_freq_by_table = navi10_get_current_clk_freq_by_table, .get_current_clk_freq_by_table = navi10_get_current_clk_freq_by_table,
.print_clk_levels = navi10_print_clk_levels, .print_clk_levels = navi10_print_clk_levels,
.force_clk_levels = navi10_force_clk_levels, .force_clk_levels = navi10_force_clk_levels,
.populate_umd_state_clk = navi10_populate_umd_state_clk,
}; };
void navi10_set_ppt_funcs(struct smu_context *smu) void navi10_set_ppt_funcs(struct smu_context *smu)
......
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