diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4284-drm-amd-powerplay-correct-current-clock-level-label-.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4284-drm-amd-powerplay-correct-current-clock-level-label-.patch | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4284-drm-amd-powerplay-correct-current-clock-level-label-.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4284-drm-amd-powerplay-correct-current-clock-level-label-.patch new file mode 100644 index 00000000..9951b6ab --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/4284-drm-amd-powerplay-correct-current-clock-level-label-.patch @@ -0,0 +1,82 @@ +From e8b3dcadd4f4ad12369d5e4699d028504609c2e0 Mon Sep 17 00:00:00 2001 +From: Evan Quan <evan.quan@amd.com> +Date: Thu, 24 Oct 2019 10:01:19 +0800 +Subject: [PATCH 4284/4736] drm/amd/powerplay: correct current clock level + label for Arcturus + +For dpm disabled case, it's assumed the only one support clock +level is always current clock level. + +Change-Id: I5cc2b7e82af888dc5e8268597ee761e9e1a26855 +Signed-off-by: Evan Quan <evan.quan@amd.com> +Acked-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 24 +++++++++++++------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +index 48f3ddc065c0..93633f76989e 100644 +--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c ++++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c +@@ -628,12 +628,17 @@ static int arcturus_print_clk_levels(struct smu_context *smu, + return ret; + } + ++ /* ++ * For DPM disabled case, there will be only one clock level. ++ * And it's safe to assume that is always the current clock. ++ */ + for (i = 0; i < clocks.num_levels; i++) + size += sprintf(buf + size, "%d: %uMhz %s\n", i, + clocks.data[i].clocks_in_khz / 1000, +- arcturus_freqs_in_same_level( ++ (clocks.num_levels == 1) ? "*" : ++ (arcturus_freqs_in_same_level( + clocks.data[i].clocks_in_khz / 1000, +- now / 100) ? "*" : ""); ++ now / 100) ? "*" : "")); + break; + + case SMU_MCLK: +@@ -653,9 +658,10 @@ static int arcturus_print_clk_levels(struct smu_context *smu, + for (i = 0; i < clocks.num_levels; i++) + size += sprintf(buf + size, "%d: %uMhz %s\n", + i, clocks.data[i].clocks_in_khz / 1000, +- arcturus_freqs_in_same_level( ++ (clocks.num_levels == 1) ? "*" : ++ (arcturus_freqs_in_same_level( + clocks.data[i].clocks_in_khz / 1000, +- now / 100) ? "*" : ""); ++ now / 100) ? "*" : "")); + break; + + case SMU_SOCCLK: +@@ -675,9 +681,10 @@ static int arcturus_print_clk_levels(struct smu_context *smu, + for (i = 0; i < clocks.num_levels; i++) + size += sprintf(buf + size, "%d: %uMhz %s\n", + i, clocks.data[i].clocks_in_khz / 1000, +- arcturus_freqs_in_same_level( ++ (clocks.num_levels == 1) ? "*" : ++ (arcturus_freqs_in_same_level( + clocks.data[i].clocks_in_khz / 1000, +- now / 100) ? "*" : ""); ++ now / 100) ? "*" : "")); + break; + + case SMU_FCLK: +@@ -697,9 +704,10 @@ static int arcturus_print_clk_levels(struct smu_context *smu, + for (i = 0; i < single_dpm_table->count; i++) + size += sprintf(buf + size, "%d: %uMhz %s\n", + i, single_dpm_table->dpm_levels[i].value, +- arcturus_freqs_in_same_level( ++ (clocks.num_levels == 1) ? "*" : ++ (arcturus_freqs_in_same_level( + clocks.data[i].clocks_in_khz / 1000, +- now / 100) ? "*" : ""); ++ now / 100) ? "*" : "")); + break; + + default: +-- +2.17.1 + |