]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd/pm/si: Fix AC/DC switch notification
authorTimur Kristóf <timur.kristof@gmail.com>
Sun, 12 Jul 2026 17:39:27 +0000 (19:39 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Jul 2026 21:40:16 +0000 (17:40 -0400)
commit86b6cf8387a4a28754fa251c79e1abfc2e57b534
tree7f9922a586bc5c38cb03501ff7eb2fd2523fb45f
parentf8922d5a946699fc2bdc7660e6778bd6726bf8b8
drm/amd/pm/si: Fix AC/DC switch notification

There were two mistakes in the previous implementation:

The check for ATOM_PP_PLATFORM_CAP_HARDWAREDC should be
inverted. We recently learned that the kernel should send
PPSMC_MSG_RunningOnAC when the flag is set, and not the
other way around.

The clocks also need to be recomputed, because the code in
the si_apply_state_adjust_rules() function selects different
limits on AC and DC.

Fixes: 2d071f6457af ("drm/amd/pm/si: Notify the SMC when switching to AC")
Tested-by: Jeremy Klarenbeek <jeremy.klarenbeek99@gmail.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 358dd0a9ce66d898fa934887385327547d599d88)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/pm/legacy-dpm/si_dpm.c