drm/amd/pm: fix pp_dpm_fclk
authorKenneth Feng <kenneth.feng@amd.com>
Wed, 21 Oct 2020 08:15:47 +0000 (16:15 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Oct 2020 03:06:23 +0000 (23:06 -0400)
fclk value is missing in pp_dpm_fclk. add this to correctly show the current value.

Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org # 5.9.x
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c

index d708b383f83be2fed14c9e597a02f22c8d048f11..9ca3d93b1c9581ae663ad919dcb2189e3833f743 100644 (file)
@@ -455,6 +455,9 @@ static int sienna_cichlid_get_smu_metrics_data(struct smu_context *smu,
        case METRICS_CURR_DCEFCLK:
                *value = metrics->CurrClock[PPCLK_DCEFCLK];
                break;
+       case METRICS_CURR_FCLK:
+               *value = metrics->CurrClock[PPCLK_FCLK];
+               break;
        case METRICS_AVERAGE_GFXCLK:
                if (metrics->AverageGfxActivity <= SMU_11_0_7_GFX_BUSY_THRESHOLD)
                        *value = metrics->AverageGfxclkFrequencyPostDs;