[PATCH 22/26] drm/amd/pm: pp_dpm_sclk change for smu_v13_0_7
Alex Deucher
alexander.deucher at amd.com
Tue May 3 20:37:12 UTC 2022
From: Kenneth Feng <kenneth.feng at amd.com>
fetch the average gfxclk according to pmfw for smu_v13_0_7
Signed-off-by: Kenneth Feng <kenneth.feng at amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
index 59f0eee1a1c3..d7e42cbe9fb7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c
@@ -667,10 +667,7 @@ static int smu_v13_0_7_get_smu_metrics_data(struct smu_context *smu,
*value = metrics->CurrClock[PPCLK_FCLK];
break;
case METRICS_AVERAGE_GFXCLK:
- if (metrics->AverageGfxActivity <= SMU_13_0_7_BUSY_THRESHOLD)
- *value = metrics->AverageGfxclkFrequencyPostDs;
- else
- *value = metrics->AverageGfxclkFrequencyPreDs;
+ *value = metrics->AverageGfxclkFrequencyTarget;
break;
case METRICS_AVERAGE_FCLK:
if (metrics->AverageUclkActivity <= SMU_13_0_7_BUSY_THRESHOLD)
@@ -844,7 +841,7 @@ static int smu_v13_0_7_get_current_clk_freq_by_table(struct smu_context *smu,
switch (clk_id) {
case PPCLK_GFXCLK:
- member_type = METRICS_CURR_GFXCLK;
+ member_type = METRICS_AVERAGE_GFXCLK;
break;
case PPCLK_UCLK:
member_type = METRICS_CURR_UCLK;
--
2.35.1
More information about the amd-gfx
mailing list