diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2348-drm-amd-powerplay-add-function-populate_umd_state_cl.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2348-drm-amd-powerplay-add-function-populate_umd_state_cl.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2348-drm-amd-powerplay-add-function-populate_umd_state_cl.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2348-drm-amd-powerplay-add-function-populate_umd_state_cl.patch new file mode 100644 index 00000000..8aedea3f --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/2348-drm-amd-powerplay-add-function-populate_umd_state_cl.patch @@ -0,0 +1,51 @@ +From d6846e6fde92c63499ab48992c0bb0fe3ba14349 Mon Sep 17 00:00:00 2001 +From: Kevin Wang <kevin1.wang@amd.com> +Date: Fri, 19 Apr 2019 13:27:19 +0800 +Subject: [PATCH 2348/2940] drm/amd/powerplay: add function + populate_umd_state_clk for navi10 + +add callback function populate_umd_state_clk for navi10 asic + +Signed-off-by: Kevin Wang <kevin1.wang@amd.com> +Reviewed-by: Huang Rui <ray.huang@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +index 311a85613001..936dfe571e6a 100644 +--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c ++++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +@@ -602,6 +602,20 @@ static int navi10_force_clk_levels(struct smu_context *smu, + 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 = { + .tables_init = navi10_tables_init, + .alloc_dpm_context = navi10_allocate_dpm_context, +@@ -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, + .print_clk_levels = navi10_print_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) +-- +2.17.1 + |