0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _VEGA10_POWERTUNE_H_
0024 #define _VEGA10_POWERTUNE_H_
0025
0026 enum vega10_pt_config_reg_type {
0027 VEGA10_CONFIGREG_MMR = 0,
0028 VEGA10_CONFIGREG_SMC_IND,
0029 VEGA10_CONFIGREG_DIDT_IND,
0030 VEGA10_CONFIGREG_CACHE,
0031 VEGA10_CONFIGREG_MAX
0032 };
0033
0034 enum vega10_didt_config_reg_type {
0035 VEGA10_CONFIGREG_DIDT = 0,
0036 VEGA10_CONFIGREG_GCCAC,
0037 VEGA10_CONFIGREG_SECAC
0038 };
0039
0040
0041 #define POWERCONTAINMENT_FEATURE_DTE 0x00000001
0042 #define POWERCONTAINMENT_FEATURE_TDCLimit 0x00000002
0043 #define POWERCONTAINMENT_FEATURE_PkgPwrLimit 0x00000004
0044
0045 struct vega10_pt_config_reg {
0046 uint32_t offset;
0047 uint32_t mask;
0048 uint32_t shift;
0049 uint32_t value;
0050 enum vega10_pt_config_reg_type type;
0051 };
0052
0053 struct vega10_didt_config_reg {
0054 uint32_t offset;
0055 uint32_t mask;
0056 uint32_t shift;
0057 uint32_t value;
0058 };
0059
0060 struct vega10_pt_defaults {
0061 uint8_t SviLoadLineEn;
0062 uint8_t SviLoadLineVddC;
0063 uint8_t TDC_VDDC_ThrottleReleaseLimitPerc;
0064 uint8_t TDC_MAWt;
0065 uint8_t TdcWaterfallCtl;
0066 uint8_t DTEAmbientTempBase;
0067 };
0068
0069 void vega10_initialize_power_tune_defaults(struct pp_hwmgr *hwmgr);
0070 int vega10_populate_bapm_parameters_in_dpm_table(struct pp_hwmgr *hwmgr);
0071 int vega10_populate_pm_fuses(struct pp_hwmgr *hwmgr);
0072 int vega10_enable_smc_cac(struct pp_hwmgr *hwmgr);
0073 int vega10_enable_power_containment(struct pp_hwmgr *hwmgr);
0074 int vega10_set_power_limit(struct pp_hwmgr *hwmgr, uint32_t n);
0075 int vega10_power_control_set_level(struct pp_hwmgr *hwmgr);
0076 int vega10_disable_power_containment(struct pp_hwmgr *hwmgr);
0077
0078 int vega10_enable_didt_config(struct pp_hwmgr *hwmgr);
0079 int vega10_disable_didt_config(struct pp_hwmgr *hwmgr);
0080
0081 #endif
0082