linux/drivers/gpu/drm/amd/pm/swsmu/smu12
Yang Wang 757ba0790b drm/amd/pm: use milliwatts for GPU power sensors
GPU average and input power backends report a mix of whole watts,
milliwatts, Q24.8 watts and decimal-packed fractions. Q24.8 is inherited
from the legacy PowerPlay sensor format. Milliwatts are a more natural unit
for the hwmon and pm_info consumers in amdgpu_pm.c. A common decoder cannot
distinguish these formats, and converting native milliwatts through Q24.8
also loses precision.

Use milliwatts as the internal unit across all PPT and PowerPlay backends.
Decode Q24.8 only at the legacy smu7 input boundary and encode it only for
the raw amdgpu_sensors debugfs interface. This gives hwmon, pm_info and the
sensor ioctl one unambiguous unit while preserving the format used by UMR.

Fixes: 5b79d0482f ("drm/amd/pp: Remove struct pp_gpu_power")
Fixes: 01992b121f ("drm/amd/pm: fix amdgpu_pm_info power display units")
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Reported-by: Lars Nieradzik <l.nieradzik@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2026-07-28 19:17:33 -04:00
..
Makefile
renoir_ppt.c drm/amd/pm: use milliwatts for GPU power sensors 2026-07-28 19:17:33 -04:00
renoir_ppt.h drm/amd/pm: correct Renoir UMD Stable Pstate settings 2020-09-17 17:48:58 -04:00
smu_v12_0.c drm/amd/pm: Unify version check in SMUv12 2026-03-30 15:13:06 -04:00