]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/pm: fix smu14 power limit range calculation
authorYang Wang <kevinyang.wang@amd.com>
Mon, 6 Jul 2026 01:29:24 +0000 (09:29 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 20:46:13 +0000 (16:46 -0400)
commite987eabc02646920cd13ab75902693e99735eca0
tree77887d605ddd0c4735730a4241daa3bd90af3fe1
parentbb52249fbbe948875155ccd45cd8d74bf4ae747b
drm/amd/pm: fix smu14 power limit range calculation

SMU14 derives the default PPT limit from SocketPowerLimitAc/Dc, but
MsgLimits.Power may expose a different firmware limit for the same PPT0
throttler. Using those values independently as fixed min/max bases can
report an incorrect configurable power range.

Keep the socket power limit as the default value and as the fallback for
current-limit queries. Calculate the reported range from both firmware
values instead, using the lower value as the minimum base and the higher
value as the maximum base before applying OD percentages.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit c936b8126b444401318fcbeb1828488cc5312dee)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c