diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-19 00:39:45 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2023-06-19 00:39:45 +0000 |
commit | cdb6ea53f95532d28c56abe42203055966114f19 (patch) | |
tree | d643264d3f6d1bd8c61c2cee9a797410550a7041 | |
parent | 8ee7a1356336c9bff59da6372ca94019012f1a5f (diff) |
drm/amd/pm: reverse mclk and fclk clocks levels for SMU v13.0.4
From Tim Huang
00abb872ef0f82dde131b9bd12096100bb24d9ba in linux-6.1.y/6.1.33
6a07826f2057b5fa1c479ba56460195882464270 in mainline linux
-rw-r--r-- | sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c index 8fa9a36c38b..6d9760eac16 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c @@ -478,7 +478,7 @@ static int smu_v13_0_4_get_dpm_level_count(struct smu_context *smu, static int smu_v13_0_4_print_clk_levels(struct smu_context *smu, enum smu_clk_type clk_type, char *buf) { - int i, size = 0, ret = 0; + int i, idx, size = 0, ret = 0; uint32_t cur_value = 0, value = 0, count = 0; uint32_t min, max; @@ -512,7 +512,8 @@ static int smu_v13_0_4_print_clk_levels(struct smu_context *smu, break; for (i = 0; i < count; i++) { - ret = smu_v13_0_4_get_dpm_freq_by_index(smu, clk_type, i, &value); + idx = (clk_type == SMU_FCLK || clk_type == SMU_MCLK) ? (count - i - 1) : i; + ret = smu_v13_0_4_get_dpm_freq_by_index(smu, clk_type, idx, &value); if (ret) break; |