drm/amd/pm: correct the way for retrieving current fclk frequency
authorEvan Quan <evan.quan@amd.com>
Thu, 28 Apr 2022 03:00:05 +0000 (11:00 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 May 2022 21:53:10 +0000 (17:53 -0400)
Instead of using AverageFclkFrequencyPostDs/AverageFclkFrequencyPreDs,
we turn to target clock frequency(CurrClock[PPCLK_FCLK]).

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

index f01227e5e96e7e2f57dc9e93a6026bd23232d55c..6a4fbcb5c4aa8c7a6352475fefad7b91d1b8909a 100644 (file)
@@ -852,7 +852,7 @@ static int smu_v13_0_0_get_current_clk_freq_by_table(struct smu_context *smu,
                member_type = METRICS_CURR_UCLK;
                break;
        case PPCLK_FCLK:
-               member_type = METRICS_AVERAGE_FCLK;
+               member_type = METRICS_CURR_FCLK;
                break;
        case PPCLK_SOCCLK:
                member_type = METRICS_CURR_SOCCLK;