]> git.hungrycats.org Git - linux/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 18:25:32 +0000 (14:25 -0400)
commitc936b8126b444401318fcbeb1828488cc5312dee
tree99d6843bcd924b75ff7ade3fa40eb02410064d11
parent22b19c575e8e750ccee5d88b39c0ac2efc8c5870
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>
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c