On 11-Jun-26 5:06 PM, Priya Hosur wrote:
Merge METRICS_AVERAGE_VCLK and METRICS_AVERAGE_DCLK into a single fall-through case mapping both to VclkFrequency. DCLK and VCLK have separate DPM clock tables but SmuMetrics_t has no DclkFrequency field, so report VclkFrequency for both.
Just to confirm - if you are seeing different DPM tables for DCLK/VCLK, this shouldn't be done. If they simply follow the DPM levels, then you could match the level for VCLK and report the frequency at the same level for DCLK. Otherwise, ask for a proper update from FW team.
Thanks, Lijo
Signed-off-by: Priya Hosur <[email protected]> --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c index 2fe006de927a..eeb508336349 100644 --- a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c +++ b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c @@ -281,10 +281,13 @@ static int smu_v14_0_0_get_smu_metrics_data(struct smu_context *smu, *value = metrics->SocclkFrequency; break; case METRICS_AVERAGE_VCLK: - *value = metrics->VclkFrequency; - break; case METRICS_AVERAGE_DCLK: - *value = 0; + /* + * DCLK and VCLK have separate DPM clock tables but + * SmuMetrics_t has no DclkFrequency field; report + * VclkFrequency for both. + */ + *value = metrics->VclkFrequency; break; case METRICS_AVERAGE_UCLK: *value = metrics->MemclkFrequency;
