static void smu7_notify_ac_dc(struct pp_hwmgr *hwmgr)
{
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
+ const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
- /* Check if the platform already manages the AC/DC switch via dedicated GPIO. */
- if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+ /*
+ * Check if the platform already manages the AC/DC switch via dedicated GPIO.
+ * Otherwise SMU automatically notices DC, but needs to be notified of AC.
+ */
+ if (adev->pm.ac_power &&
+ phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
PHM_PlatformCaps_AutomaticDCTransition))
- return;
-
- /* The SMU automatically notices DC, but needs to be notified when switching to AC. */
- if (adev->pm.ac_power)
smum_send_msg_to_smc(hwmgr, PPSMC_MSG_RunningOnAC, NULL);
+
+ /* Recompute clocks with updated max_limits. */
+ pp_funcs->pm_compute_clocks(adev->powerplay.pp_handle);
}
static const struct pp_hwmgr_func smu7_hwmgr_funcs = {