drm/amd/pm/smu7: Notify SMU7 of DC->AC switch
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 19 May 2026 08:41:56 +0000 (10:41 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 27 May 2026 14:48:15 +0000 (10:48 -0400)
commit96da0d86614e2e8ab34afd5b8578e8ee43963df5
tree1acd7394f8682a2af7db9aef4f82515e1beb68de
parentba1fcd1bac89d0403f910754e1d5ec22acb5bf28
drm/amd/pm/smu7: Notify SMU7 of DC->AC switch

When ATOM_PP_PLATFORM_CAP_HARDWAREDC is set,
the SMU has a GPIO pin for detecting AC/DC switch
and everything works automatically.

Otherwise when there is no GPIO pin, the SMU can
automatically detect switching to DC, but needs
to be notified of switching to AC.

Use PPSMC_MSG_RunningOnAC to notify the SMC
when switching to AC.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h