Correct Polaris10 platformcaps setup.
Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
        phm_cap_set(hwmgr->platform_descriptor.platformCaps,
                                        PHM_PlatformCaps_AutomaticDCTransition);
 
-       if (hwmgr->chip_id != CHIP_POLARIS10)
+       if (((hwmgr->chip_id == CHIP_POLARIS11) && !hwmgr->is_kicker) ||
+           (hwmgr->chip_id == CHIP_POLARIS12))
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                                       PHM_PlatformCaps_SPLLShutdownSupport);
+                               PHM_PlatformCaps_SPLLShutdownSupport);
 
        if (hwmgr->chip_id != CHIP_POLARIS11) {
                phm_cap_set(hwmgr->platform_descriptor.platformCaps,
 
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
                        PHM_PlatformCaps_EngineSpreadSpectrumSupport);
        }
+
+       if ((adev->pdev->device == 0x699F) &&
+           (adev->pdev->revision == 0xCF)) {
+               phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
+                               PHM_PlatformCaps_PowerContainment);
+               data->enable_tdc_limit_feature = false;
+               data->enable_pkg_pwr_tracking_feature = false;
+               data->disable_edc_leakage_controller = true;
+               phm_cap_unset(hwmgr->platform_descriptor.platformCaps,
+                                       PHM_PlatformCaps_ClockStretcher);
+       }
 }
 
 static int smu7_calculate_ro_range(struct pp_hwmgr *hwmgr)
 
        if (atomctrl_get_pp_assign_pin(hwmgr, PP_AC_DC_SWITCH_GPIO_PINID,
                        &gpio_pin)) {
                table->AcDcGpio = gpio_pin.uc_gpio_pin_bit_shift;
-               phm_cap_set(hwmgr->platform_descriptor.platformCaps,
-                               PHM_PlatformCaps_AutomaticDCTransition);
+               if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
+                               PHM_PlatformCaps_AutomaticDCTransition) &&
+                   !smum_send_msg_to_smc(hwmgr, PPSMC_MSG_UseNewGPIOScheme, NULL))
+                       phm_cap_set(hwmgr->platform_descriptor.platformCaps,
+                                       PHM_PlatformCaps_SMCtoPPLIBAcdcGpioScheme);
        } else {
                table->AcDcGpio = SMU7_UNUSED_GPIO_PIN;
                phm_cap_unset(hwmgr->platform_descriptor.platformCaps,