Fix several pp_dpm_* sysfs entries on SMU v14.0.0 and v14.0.1 APUs
(e.g. Radeon 8060S / GC 11.5.x) that either report incorrect values or
never show the active-level "*" marker.

v4:
- Patch 1: instead of falling through to VclkFrequency for DCLK,
  match VclkFrequency to its DPM level index and report the DCLK
  frequency at the same level, since DCLK and VCLK have different
  DPM frequency tables (Lijo)
- Patch 4: added Reviewed-by from Lijo

v3:
- Patch 1: expanded inline comment to note that DCLK and VCLK have
  separate DPM tables even though SmuMetrics_t only has VclkFrequency
  (Lijo)
- Patch 4: dropped redundant exact_match bool; always use closest_idx
  to mark the active level (Lijo)

v2:
- Patch 1: dropped VCLK1/DCLK1 metric handlers (UINT_MAX -> N/A is
  correct; VCN1 only present on v14.0.1) (Lijo, Mario)
- Patch 4: break on exact match; early exit when DPM table is sorted
  and diff starts increasing (Lijo)

Priya Hosur (4):
  drm/amd/pm: smu_v14_0_0: fix DCLK metric reporting via VCLK level
    index
  drm/amd/pm: add IP_VERSION(11,5,1) to vclk/dclk DPM sysfs whitelists
  drm/amd/pm: smu_v14_0_0: add SMU_DCEFCLK support in DPM frequency
    queries
  drm/amd/pm: smu_v14_0_0: add closest-match fallback for DPM level
    marking

 drivers/gpu/drm/amd/pm/amdgpu_pm.c            |  8 +-
 .../drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c  | 97 ++++++++++++++++++-
 2 files changed, 98 insertions(+), 7 deletions(-)

-- 
2.43.0

Reply via email to