drm/amd/pm: correct the way for retrieving current uclk frequency
authorEvan Quan <evan.quan@amd.com>
Wed, 27 Apr 2022 15:22:00 +0000 (23:22 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 May 2022 21:53:10 +0000 (17:53 -0400)
There is some problem with average frequency reading for now. So,
we switch to the target frequency reading.

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 3fd0ab9..f01227e 100644 (file)
@@ -849,7 +849,7 @@ static int smu_v13_0_0_get_current_clk_freq_by_table(struct smu_context *smu,
                member_type = METRICS_AVERAGE_GFXCLK;
                break;
        case PPCLK_UCLK:
-               member_type = METRICS_AVERAGE_UCLK;
+               member_type = METRICS_CURR_UCLK;
                break;
        case PPCLK_FCLK:
                member_type = METRICS_AVERAGE_FCLK;