mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/pm: compute SMU v15.0.0 gpu_metrics from accumulator table
Rework smu_v15_0_0_get_gpu_metrics() to derive values from the raw accumulator double-buffer instead of the firmware-computed SmuMetrics_t snapshot: - Add SMU_V15_IOD_AVG()/SMU_V15_CORE_AVG() helpers: wrapping_sub() delta over the sampling window, scaled by the caller's unit factor, then descaled from Q10 fixed-point with >>10 (scale before shift to keep sub-unit precision); typeof() preserves each field's width. - Reuse the same macro in smu_v15_0_0_compute_all_metrics(), dropping the open-coded div_u64(..., 1024) boilerplate. - Drop the unused smu_v15_0_0_get_gpu_metrics_table() helper and the SMU_TABLE_SMU_METRICS allocation. Signed-off-by: Shubhankar Milind Sardeshpande <Shubhankar.MilindSardeshpande@amd.com> Assisted-by: Claude:claude-opus-4.8 Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
968b69dd79
commit
d870f2f01b
2 changed files with 142 additions and 188 deletions
Loading…
Add table
Add a link
Reference in a new issue