1 1.1 riastrad /* $NetBSD: pptable.h,v 1.3 2021/12/18 23:45:08 riastradh Exp $ */ 2 1.1 riastrad 3 1.1 riastrad /* 4 1.1 riastrad * Copyright 2013 Advanced Micro Devices, Inc. 5 1.1 riastrad * 6 1.1 riastrad * Permission is hereby granted, free of charge, to any person obtaining a 7 1.1 riastrad * copy of this software and associated documentation files (the "Software"), 8 1.1 riastrad * to deal in the Software without restriction, including without limitation 9 1.1 riastrad * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 1.1 riastrad * and/or sell copies of the Software, and to permit persons to whom the 11 1.1 riastrad * Software is furnished to do so, subject to the following conditions: 12 1.1 riastrad * 13 1.1 riastrad * The above copyright notice and this permission notice shall be included in 14 1.1 riastrad * all copies or substantial portions of the Software. 15 1.1 riastrad * 16 1.1 riastrad * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 1.1 riastrad * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 1.1 riastrad * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 1.1 riastrad * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 1.1 riastrad * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 1.1 riastrad * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 1.1 riastrad * OTHER DEALINGS IN THE SOFTWARE. 23 1.1 riastrad */ 24 1.1 riastrad 25 1.1 riastrad #ifndef _PPTABLE_H 26 1.1 riastrad #define _PPTABLE_H 27 1.1 riastrad 28 1.1 riastrad #pragma pack(1) 29 1.1 riastrad 30 1.1 riastrad typedef struct _ATOM_PPLIB_THERMALCONTROLLER 31 1.1 riastrad 32 1.1 riastrad { 33 1.1 riastrad UCHAR ucType; // one of ATOM_PP_THERMALCONTROLLER_* 34 1.1 riastrad UCHAR ucI2cLine; // as interpreted by DAL I2C 35 1.1 riastrad UCHAR ucI2cAddress; 36 1.1 riastrad UCHAR ucFanParameters; // Fan Control Parameters. 37 1.1 riastrad UCHAR ucFanMinRPM; // Fan Minimum RPM (hundreds) -- for display purposes only. 38 1.1 riastrad UCHAR ucFanMaxRPM; // Fan Maximum RPM (hundreds) -- for display purposes only. 39 1.1 riastrad UCHAR ucReserved; // ---- 40 1.1 riastrad UCHAR ucFlags; // to be defined 41 1.1 riastrad } ATOM_PPLIB_THERMALCONTROLLER; 42 1.1 riastrad 43 1.1 riastrad #define ATOM_PP_FANPARAMETERS_TACHOMETER_PULSES_PER_REVOLUTION_MASK 0x0f 44 1.1 riastrad #define ATOM_PP_FANPARAMETERS_NOFAN 0x80 // No fan is connected to this controller. 45 1.1 riastrad 46 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_NONE 0 47 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_LM63 1 // Not used by PPLib 48 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_ADM1032 2 // Not used by PPLib 49 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_ADM1030 3 // Not used by PPLib 50 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_MUA6649 4 // Not used by PPLib 51 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_LM64 5 52 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_F75375 6 // Not used by PPLib 53 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_RV6xx 7 54 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_RV770 8 55 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_ADT7473 9 56 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_KONG 10 57 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_EXTERNAL_GPIO 11 58 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_EVERGREEN 12 59 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_EMC2103 13 /* 0x0D */ // Only fan control will be implemented, do NOT show this in PPGen. 60 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_SUMO 14 /* 0x0E */ // Sumo type, used internally 61 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_NISLANDS 15 62 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_SISLANDS 16 63 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_LM96163 17 64 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_CISLANDS 18 65 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_KAVERI 19 66 1.3 riastrad #define ATOM_PP_THERMALCONTROLLER_ICELAND 20 67 1.3 riastrad #define ATOM_PP_THERMALCONTROLLER_TONGA 21 68 1.3 riastrad #define ATOM_PP_THERMALCONTROLLER_FIJI 22 69 1.3 riastrad #define ATOM_PP_THERMALCONTROLLER_POLARIS10 23 70 1.3 riastrad #define ATOM_PP_THERMALCONTROLLER_VEGA10 24 71 1.1 riastrad 72 1.1 riastrad 73 1.1 riastrad // Thermal controller 'combo type' to use an external controller for Fan control and an internal controller for thermal. 74 1.1 riastrad // We probably should reserve the bit 0x80 for this use. 75 1.1 riastrad // To keep the number of these types low we should also use the same code for all ASICs (i.e. do not distinguish RV6xx and RV7xx Internal here). 76 1.1 riastrad // The driver can pick the correct internal controller based on the ASIC. 77 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_ADT7473_WITH_INTERNAL 0x89 // ADT7473 Fan Control + Internal Thermal Controller 78 1.1 riastrad #define ATOM_PP_THERMALCONTROLLER_EMC2103_WITH_INTERNAL 0x8D // EMC2103 Fan Control + Internal Thermal Controller 79 1.1 riastrad 80 1.1 riastrad typedef struct _ATOM_PPLIB_STATE 81 1.1 riastrad { 82 1.1 riastrad UCHAR ucNonClockStateIndex; 83 1.1 riastrad UCHAR ucClockStateIndices[1]; // variable-sized 84 1.1 riastrad } ATOM_PPLIB_STATE; 85 1.1 riastrad 86 1.1 riastrad 87 1.1 riastrad typedef struct _ATOM_PPLIB_FANTABLE 88 1.1 riastrad { 89 1.1 riastrad UCHAR ucFanTableFormat; // Change this if the table format changes or version changes so that the other fields are not the same. 90 1.1 riastrad UCHAR ucTHyst; // Temperature hysteresis. Integer. 91 1.1 riastrad USHORT usTMin; // The temperature, in 0.01 centigrades, below which we just run at a minimal PWM. 92 1.1 riastrad USHORT usTMed; // The middle temperature where we change slopes. 93 1.1 riastrad USHORT usTHigh; // The high point above TMed for adjusting the second slope. 94 1.1 riastrad USHORT usPWMMin; // The minimum PWM value in percent (0.01% increments). 95 1.1 riastrad USHORT usPWMMed; // The PWM value (in percent) at TMed. 96 1.1 riastrad USHORT usPWMHigh; // The PWM value at THigh. 97 1.1 riastrad } ATOM_PPLIB_FANTABLE; 98 1.1 riastrad 99 1.1 riastrad typedef struct _ATOM_PPLIB_FANTABLE2 100 1.1 riastrad { 101 1.1 riastrad ATOM_PPLIB_FANTABLE basicTable; 102 1.1 riastrad USHORT usTMax; // The max temperature 103 1.1 riastrad } ATOM_PPLIB_FANTABLE2; 104 1.1 riastrad 105 1.1 riastrad typedef struct _ATOM_PPLIB_FANTABLE3 106 1.1 riastrad { 107 1.1 riastrad ATOM_PPLIB_FANTABLE2 basicTable2; 108 1.1 riastrad UCHAR ucFanControlMode; 109 1.1 riastrad USHORT usFanPWMMax; 110 1.1 riastrad USHORT usFanOutputSensitivity; 111 1.1 riastrad } ATOM_PPLIB_FANTABLE3; 112 1.1 riastrad 113 1.3 riastrad typedef struct _ATOM_PPLIB_FANTABLE4 114 1.3 riastrad { 115 1.3 riastrad ATOM_PPLIB_FANTABLE3 basicTable3; 116 1.3 riastrad USHORT usFanRPMMax; 117 1.3 riastrad } ATOM_PPLIB_FANTABLE4; 118 1.3 riastrad 119 1.3 riastrad typedef struct _ATOM_PPLIB_FANTABLE5 120 1.3 riastrad { 121 1.3 riastrad ATOM_PPLIB_FANTABLE4 basicTable4; 122 1.3 riastrad USHORT usFanCurrentLow; 123 1.3 riastrad USHORT usFanCurrentHigh; 124 1.3 riastrad USHORT usFanRPMLow; 125 1.3 riastrad USHORT usFanRPMHigh; 126 1.3 riastrad } ATOM_PPLIB_FANTABLE5; 127 1.3 riastrad 128 1.1 riastrad typedef struct _ATOM_PPLIB_EXTENDEDHEADER 129 1.1 riastrad { 130 1.1 riastrad USHORT usSize; 131 1.1 riastrad ULONG ulMaxEngineClock; // For Overdrive. 132 1.1 riastrad ULONG ulMaxMemoryClock; // For Overdrive. 133 1.1 riastrad // Add extra system parameters here, always adjust size to include all fields. 134 1.1 riastrad USHORT usVCETableOffset; //points to ATOM_PPLIB_VCE_Table 135 1.1 riastrad USHORT usUVDTableOffset; //points to ATOM_PPLIB_UVD_Table 136 1.1 riastrad USHORT usSAMUTableOffset; //points to ATOM_PPLIB_SAMU_Table 137 1.1 riastrad USHORT usPPMTableOffset; //points to ATOM_PPLIB_PPM_Table 138 1.1 riastrad USHORT usACPTableOffset; //points to ATOM_PPLIB_ACP_Table 139 1.1 riastrad /* points to ATOM_PPLIB_POWERTUNE_Table */ 140 1.1 riastrad USHORT usPowerTuneTableOffset; 141 1.1 riastrad /* points to ATOM_PPLIB_CLOCK_Voltage_Dependency_Table for sclkVddgfxTable */ 142 1.1 riastrad USHORT usSclkVddgfxTableOffset; 143 1.3 riastrad USHORT usVQBudgetingTableOffset; /* points to the vqBudgetingTable; */ 144 1.1 riastrad } ATOM_PPLIB_EXTENDEDHEADER; 145 1.1 riastrad 146 1.1 riastrad //// ATOM_PPLIB_POWERPLAYTABLE::ulPlatformCaps 147 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_BACKBIAS 1 148 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_POWERPLAY 2 149 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 4 150 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_ASPM_L0s 8 151 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_ASPM_L1 16 152 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_HARDWAREDC 32 153 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_GEMINIPRIMARY 64 154 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_STEPVDDC 128 155 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_VOLTAGECONTROL 256 156 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_SIDEPORTCONTROL 512 157 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_TURNOFFPLL_ASPML1 1024 158 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_HTLINKCONTROL 2048 159 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_MVDDCONTROL 4096 160 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_GOTO_BOOT_ON_ALERT 0x2000 // Go to boot state on alerts, e.g. on an AC->DC transition. 161 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_DONT_WAIT_FOR_VBLANK_ON_ALERT 0x4000 // Do NOT wait for VBLANK during an alert (e.g. AC->DC transition). 162 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_VDDCI_CONTROL 0x8000 // Does the driver control VDDCI independently from VDDC. 163 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_REGULATOR_HOT 0x00010000 // Enable the 'regulator hot' feature. 164 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_BACO 0x00020000 // Does the driver supports BACO state. 165 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_NEW_CAC_VOLTAGE 0x00040000 // Does the driver supports new CAC voltage table. 166 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_REVERT_GPIO5_POLARITY 0x00080000 // Does the driver supports revert GPIO5 polarity. 167 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_OUTPUT_THERMAL2GPIO17 0x00100000 // Does the driver supports thermal2GPIO17. 168 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_VRHOT_GPIO_CONFIGURABLE 0x00200000 // Does the driver supports VR HOT GPIO Configurable. 169 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_TEMP_INVERSION 0x00400000 // Does the driver supports Temp Inversion feature. 170 1.1 riastrad #define ATOM_PP_PLATFORM_CAP_EVV 0x00800000 171 1.1 riastrad #define ATOM_PP_PLATFORM_COMBINE_PCC_WITH_THERMAL_SIGNAL 0x01000000 172 1.3 riastrad #define ATOM_PP_PLATFORM_LOAD_POST_PRODUCTION_FIRMWARE 0x02000000 173 1.3 riastrad #define ATOM_PP_PLATFORM_CAP_DISABLE_USING_ACTUAL_TEMPERATURE_FOR_POWER_CALC 0x04000000 174 1.3 riastrad #define ATOM_PP_PLATFORM_CAP_VRHOT_POLARITY_HIGH 0x08000000 175 1.1 riastrad 176 1.1 riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE 177 1.1 riastrad { 178 1.1 riastrad ATOM_COMMON_TABLE_HEADER sHeader; 179 1.1 riastrad 180 1.1 riastrad UCHAR ucDataRevision; 181 1.1 riastrad 182 1.1 riastrad UCHAR ucNumStates; 183 1.1 riastrad UCHAR ucStateEntrySize; 184 1.1 riastrad UCHAR ucClockInfoSize; 185 1.1 riastrad UCHAR ucNonClockSize; 186 1.1 riastrad 187 1.1 riastrad // offset from start of this table to array of ucNumStates ATOM_PPLIB_STATE structures 188 1.1 riastrad USHORT usStateArrayOffset; 189 1.1 riastrad 190 1.1 riastrad // offset from start of this table to array of ASIC-specific structures, 191 1.1 riastrad // currently ATOM_PPLIB_CLOCK_INFO. 192 1.1 riastrad USHORT usClockInfoArrayOffset; 193 1.1 riastrad 194 1.1 riastrad // offset from start of this table to array of ATOM_PPLIB_NONCLOCK_INFO 195 1.1 riastrad USHORT usNonClockInfoArrayOffset; 196 1.1 riastrad 197 1.1 riastrad USHORT usBackbiasTime; // in microseconds 198 1.1 riastrad USHORT usVoltageTime; // in microseconds 199 1.1 riastrad USHORT usTableSize; //the size of this structure, or the extended structure 200 1.1 riastrad 201 1.1 riastrad ULONG ulPlatformCaps; // See ATOM_PPLIB_CAPS_* 202 1.1 riastrad 203 1.1 riastrad ATOM_PPLIB_THERMALCONTROLLER sThermalController; 204 1.1 riastrad 205 1.1 riastrad USHORT usBootClockInfoOffset; 206 1.1 riastrad USHORT usBootNonClockInfoOffset; 207 1.1 riastrad 208 1.1 riastrad } ATOM_PPLIB_POWERPLAYTABLE; 209 1.1 riastrad 210 1.1 riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE2 211 1.1 riastrad { 212 1.1 riastrad ATOM_PPLIB_POWERPLAYTABLE basicTable; 213 1.1 riastrad UCHAR ucNumCustomThermalPolicy; 214 1.1 riastrad USHORT usCustomThermalPolicyArrayOffset; 215 1.1 riastrad }ATOM_PPLIB_POWERPLAYTABLE2, *LPATOM_PPLIB_POWERPLAYTABLE2; 216 1.1 riastrad 217 1.1 riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE3 218 1.1 riastrad { 219 1.1 riastrad ATOM_PPLIB_POWERPLAYTABLE2 basicTable2; 220 1.1 riastrad USHORT usFormatID; // To be used ONLY by PPGen. 221 1.1 riastrad USHORT usFanTableOffset; 222 1.1 riastrad USHORT usExtendendedHeaderOffset; 223 1.1 riastrad } ATOM_PPLIB_POWERPLAYTABLE3, *LPATOM_PPLIB_POWERPLAYTABLE3; 224 1.1 riastrad 225 1.1 riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE4 226 1.1 riastrad { 227 1.1 riastrad ATOM_PPLIB_POWERPLAYTABLE3 basicTable3; 228 1.1 riastrad ULONG ulGoldenPPID; // PPGen use only 229 1.1 riastrad ULONG ulGoldenRevision; // PPGen use only 230 1.1 riastrad USHORT usVddcDependencyOnSCLKOffset; 231 1.1 riastrad USHORT usVddciDependencyOnMCLKOffset; 232 1.1 riastrad USHORT usVddcDependencyOnMCLKOffset; 233 1.1 riastrad USHORT usMaxClockVoltageOnDCOffset; 234 1.1 riastrad USHORT usVddcPhaseShedLimitsTableOffset; // Points to ATOM_PPLIB_PhaseSheddingLimits_Table 235 1.1 riastrad USHORT usMvddDependencyOnMCLKOffset; 236 1.1 riastrad } ATOM_PPLIB_POWERPLAYTABLE4, *LPATOM_PPLIB_POWERPLAYTABLE4; 237 1.1 riastrad 238 1.1 riastrad typedef struct _ATOM_PPLIB_POWERPLAYTABLE5 239 1.1 riastrad { 240 1.1 riastrad ATOM_PPLIB_POWERPLAYTABLE4 basicTable4; 241 1.1 riastrad ULONG ulTDPLimit; 242 1.1 riastrad ULONG ulNearTDPLimit; 243 1.1 riastrad ULONG ulSQRampingThreshold; 244 1.1 riastrad USHORT usCACLeakageTableOffset; // Points to ATOM_PPLIB_CAC_Leakage_Table 245 1.1 riastrad ULONG ulCACLeakage; // The iLeakage for driver calculated CAC leakage table 246 1.1 riastrad USHORT usTDPODLimit; 247 1.1 riastrad USHORT usLoadLineSlope; // in milliOhms * 100 248 1.1 riastrad } ATOM_PPLIB_POWERPLAYTABLE5, *LPATOM_PPLIB_POWERPLAYTABLE5; 249 1.1 riastrad 250 1.1 riastrad //// ATOM_PPLIB_NONCLOCK_INFO::usClassification 251 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_MASK 0x0007 252 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_SHIFT 0 253 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_NONE 0 254 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_BATTERY 1 255 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_BALANCED 3 256 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE 5 257 1.1 riastrad // 2, 4, 6, 7 are reserved 258 1.1 riastrad 259 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_BOOT 0x0008 260 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_THERMAL 0x0010 261 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_LIMITEDPOWERSOURCE 0x0020 262 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_REST 0x0040 263 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_FORCED 0x0080 264 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_3DPERFORMANCE 0x0100 265 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_OVERDRIVETEMPLATE 0x0200 266 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_UVDSTATE 0x0400 267 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_3DLOW 0x0800 268 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_ACPI 0x1000 269 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_HD2STATE 0x2000 270 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_HDSTATE 0x4000 271 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION_SDSTATE 0x8000 272 1.1 riastrad 273 1.1 riastrad //// ATOM_PPLIB_NONCLOCK_INFO::usClassification2 274 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION2_LIMITEDPOWERSOURCE_2 0x0001 275 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION2_ULV 0x0002 276 1.1 riastrad #define ATOM_PPLIB_CLASSIFICATION2_MVC 0x0004 //Multi-View Codec (BD-3D) 277 1.1 riastrad 278 1.1 riastrad //// ATOM_PPLIB_NONCLOCK_INFO::ulCapsAndSettings 279 1.1 riastrad #define ATOM_PPLIB_SINGLE_DISPLAY_ONLY 0x00000001 280 1.1 riastrad #define ATOM_PPLIB_SUPPORTS_VIDEO_PLAYBACK 0x00000002 281 1.1 riastrad 282 1.1 riastrad // 0 is 2.5Gb/s, 1 is 5Gb/s 283 1.1 riastrad #define ATOM_PPLIB_PCIE_LINK_SPEED_MASK 0x00000004 284 1.1 riastrad #define ATOM_PPLIB_PCIE_LINK_SPEED_SHIFT 2 285 1.1 riastrad 286 1.1 riastrad // lanes - 1: 1, 2, 4, 8, 12, 16 permitted by PCIE spec 287 1.1 riastrad #define ATOM_PPLIB_PCIE_LINK_WIDTH_MASK 0x000000F8 288 1.1 riastrad #define ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT 3 289 1.1 riastrad 290 1.1 riastrad // lookup into reduced refresh-rate table 291 1.1 riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_MASK 0x00000F00 292 1.1 riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_VALUE_SHIFT 8 293 1.1 riastrad 294 1.1 riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_UNLIMITED 0 295 1.1 riastrad #define ATOM_PPLIB_LIMITED_REFRESHRATE_50HZ 1 296 1.1 riastrad // 2-15 TBD as needed. 297 1.1 riastrad 298 1.1 riastrad #define ATOM_PPLIB_SOFTWARE_DISABLE_LOADBALANCING 0x00001000 299 1.1 riastrad #define ATOM_PPLIB_SOFTWARE_ENABLE_SLEEP_FOR_TIMESTAMPS 0x00002000 300 1.1 riastrad 301 1.1 riastrad #define ATOM_PPLIB_DISALLOW_ON_DC 0x00004000 302 1.1 riastrad 303 1.1 riastrad #define ATOM_PPLIB_ENABLE_VARIBRIGHT 0x00008000 304 1.1 riastrad 305 1.1 riastrad //memory related flags 306 1.1 riastrad #define ATOM_PPLIB_SWSTATE_MEMORY_DLL_OFF 0x000010000 307 1.1 riastrad 308 1.1 riastrad //M3 Arb //2bits, current 3 sets of parameters in total 309 1.1 riastrad #define ATOM_PPLIB_M3ARB_MASK 0x00060000 310 1.1 riastrad #define ATOM_PPLIB_M3ARB_SHIFT 17 311 1.1 riastrad 312 1.1 riastrad #define ATOM_PPLIB_ENABLE_DRR 0x00080000 313 1.1 riastrad 314 1.1 riastrad // remaining 16 bits are reserved 315 1.1 riastrad typedef struct _ATOM_PPLIB_THERMAL_STATE 316 1.1 riastrad { 317 1.1 riastrad UCHAR ucMinTemperature; 318 1.1 riastrad UCHAR ucMaxTemperature; 319 1.1 riastrad UCHAR ucThermalAction; 320 1.1 riastrad }ATOM_PPLIB_THERMAL_STATE, *LPATOM_PPLIB_THERMAL_STATE; 321 1.1 riastrad 322 1.1 riastrad // Contained in an array starting at the offset 323 1.1 riastrad // in ATOM_PPLIB_POWERPLAYTABLE::usNonClockInfoArrayOffset. 324 1.1 riastrad // referenced from ATOM_PPLIB_STATE_INFO::ucNonClockStateIndex 325 1.1 riastrad #define ATOM_PPLIB_NONCLOCKINFO_VER1 12 326 1.1 riastrad #define ATOM_PPLIB_NONCLOCKINFO_VER2 24 327 1.1 riastrad typedef struct _ATOM_PPLIB_NONCLOCK_INFO 328 1.1 riastrad { 329 1.1 riastrad USHORT usClassification; 330 1.1 riastrad UCHAR ucMinTemperature; 331 1.1 riastrad UCHAR ucMaxTemperature; 332 1.1 riastrad ULONG ulCapsAndSettings; 333 1.1 riastrad UCHAR ucRequiredPower; 334 1.1 riastrad USHORT usClassification2; 335 1.1 riastrad ULONG ulVCLK; 336 1.1 riastrad ULONG ulDCLK; 337 1.1 riastrad UCHAR ucUnused[5]; 338 1.1 riastrad } ATOM_PPLIB_NONCLOCK_INFO; 339 1.1 riastrad 340 1.1 riastrad // Contained in an array starting at the offset 341 1.1 riastrad // in ATOM_PPLIB_POWERPLAYTABLE::usClockInfoArrayOffset. 342 1.1 riastrad // referenced from ATOM_PPLIB_STATE::ucClockStateIndices 343 1.1 riastrad typedef struct _ATOM_PPLIB_R600_CLOCK_INFO 344 1.1 riastrad { 345 1.1 riastrad USHORT usEngineClockLow; 346 1.1 riastrad UCHAR ucEngineClockHigh; 347 1.1 riastrad 348 1.1 riastrad USHORT usMemoryClockLow; 349 1.1 riastrad UCHAR ucMemoryClockHigh; 350 1.1 riastrad 351 1.1 riastrad USHORT usVDDC; 352 1.1 riastrad USHORT usUnused1; 353 1.1 riastrad USHORT usUnused2; 354 1.1 riastrad 355 1.1 riastrad ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_* 356 1.1 riastrad 357 1.1 riastrad } ATOM_PPLIB_R600_CLOCK_INFO; 358 1.1 riastrad 359 1.1 riastrad // ulFlags in ATOM_PPLIB_R600_CLOCK_INFO 360 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_PCIEGEN2 1 361 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_UVDSAFE 2 362 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE 4 363 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_MEMORY_ODT_OFF 8 364 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_MEMORY_DLL_OFF 16 365 1.1 riastrad #define ATOM_PPLIB_R600_FLAGS_LOWPOWER 32 // On the RV770 use 'low power' setting (sequencer S0). 366 1.1 riastrad 367 1.1 riastrad typedef struct _ATOM_PPLIB_RS780_CLOCK_INFO 368 1.1 riastrad 369 1.1 riastrad { 370 1.1 riastrad USHORT usLowEngineClockLow; // Low Engine clock in MHz (the same way as on the R600). 371 1.1 riastrad UCHAR ucLowEngineClockHigh; 372 1.1 riastrad USHORT usHighEngineClockLow; // High Engine clock in MHz. 373 1.1 riastrad UCHAR ucHighEngineClockHigh; 374 1.1 riastrad USHORT usMemoryClockLow; // For now one of the ATOM_PPLIB_RS780_SPMCLK_XXXX constants. 375 1.1 riastrad UCHAR ucMemoryClockHigh; // Currentyl unused. 376 1.1 riastrad UCHAR ucPadding; // For proper alignment and size. 377 1.1 riastrad USHORT usVDDC; // For the 780, use: None, Low, High, Variable 378 1.1 riastrad UCHAR ucMaxHTLinkWidth; // From SBIOS - {2, 4, 8, 16} 379 1.1 riastrad UCHAR ucMinHTLinkWidth; // From SBIOS - {2, 4, 8, 16}. Effective only if CDLW enabled. Minimum down stream width could 380 1.1 riastrad USHORT usHTLinkFreq; // See definition ATOM_PPLIB_RS780_HTLINKFREQ_xxx or in MHz(>=200). 381 1.1 riastrad ULONG ulFlags; 382 1.1 riastrad } ATOM_PPLIB_RS780_CLOCK_INFO; 383 1.1 riastrad 384 1.1 riastrad #define ATOM_PPLIB_RS780_VOLTAGE_NONE 0 385 1.1 riastrad #define ATOM_PPLIB_RS780_VOLTAGE_LOW 1 386 1.1 riastrad #define ATOM_PPLIB_RS780_VOLTAGE_HIGH 2 387 1.1 riastrad #define ATOM_PPLIB_RS780_VOLTAGE_VARIABLE 3 388 1.1 riastrad 389 1.1 riastrad #define ATOM_PPLIB_RS780_SPMCLK_NONE 0 // We cannot change the side port memory clock, leave it as it is. 390 1.1 riastrad #define ATOM_PPLIB_RS780_SPMCLK_LOW 1 391 1.1 riastrad #define ATOM_PPLIB_RS780_SPMCLK_HIGH 2 392 1.1 riastrad 393 1.1 riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_NONE 0 394 1.1 riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_LOW 1 395 1.1 riastrad #define ATOM_PPLIB_RS780_HTLINKFREQ_HIGH 2 396 1.1 riastrad 397 1.1 riastrad typedef struct _ATOM_PPLIB_EVERGREEN_CLOCK_INFO 398 1.1 riastrad { 399 1.1 riastrad USHORT usEngineClockLow; 400 1.1 riastrad UCHAR ucEngineClockHigh; 401 1.1 riastrad 402 1.1 riastrad USHORT usMemoryClockLow; 403 1.1 riastrad UCHAR ucMemoryClockHigh; 404 1.1 riastrad 405 1.1 riastrad USHORT usVDDC; 406 1.1 riastrad USHORT usVDDCI; 407 1.1 riastrad USHORT usUnused; 408 1.1 riastrad 409 1.1 riastrad ULONG ulFlags; // ATOM_PPLIB_R600_FLAGS_* 410 1.1 riastrad 411 1.1 riastrad } ATOM_PPLIB_EVERGREEN_CLOCK_INFO; 412 1.1 riastrad 413 1.1 riastrad typedef struct _ATOM_PPLIB_SI_CLOCK_INFO 414 1.1 riastrad { 415 1.1 riastrad USHORT usEngineClockLow; 416 1.1 riastrad UCHAR ucEngineClockHigh; 417 1.1 riastrad 418 1.1 riastrad USHORT usMemoryClockLow; 419 1.1 riastrad UCHAR ucMemoryClockHigh; 420 1.1 riastrad 421 1.1 riastrad USHORT usVDDC; 422 1.1 riastrad USHORT usVDDCI; 423 1.1 riastrad UCHAR ucPCIEGen; 424 1.1 riastrad UCHAR ucUnused1; 425 1.1 riastrad 426 1.1 riastrad ULONG ulFlags; // ATOM_PPLIB_SI_FLAGS_*, no flag is necessary for now 427 1.1 riastrad 428 1.1 riastrad } ATOM_PPLIB_SI_CLOCK_INFO; 429 1.1 riastrad 430 1.1 riastrad typedef struct _ATOM_PPLIB_CI_CLOCK_INFO 431 1.1 riastrad { 432 1.1 riastrad USHORT usEngineClockLow; 433 1.1 riastrad UCHAR ucEngineClockHigh; 434 1.1 riastrad 435 1.1 riastrad USHORT usMemoryClockLow; 436 1.1 riastrad UCHAR ucMemoryClockHigh; 437 1.1 riastrad 438 1.1 riastrad UCHAR ucPCIEGen; 439 1.1 riastrad USHORT usPCIELane; 440 1.1 riastrad } ATOM_PPLIB_CI_CLOCK_INFO; 441 1.1 riastrad 442 1.1 riastrad typedef struct _ATOM_PPLIB_SUMO_CLOCK_INFO{ 443 1.1 riastrad USHORT usEngineClockLow; //clockfrequency & 0xFFFF. The unit is in 10khz 444 1.1 riastrad UCHAR ucEngineClockHigh; //clockfrequency >> 16. 445 1.1 riastrad UCHAR vddcIndex; //2-bit vddc index; 446 1.1 riastrad USHORT tdpLimit; 447 1.1 riastrad //please initalize to 0 448 1.1 riastrad USHORT rsv1; 449 1.1 riastrad //please initialize to 0s 450 1.1 riastrad ULONG rsv2[2]; 451 1.1 riastrad }ATOM_PPLIB_SUMO_CLOCK_INFO; 452 1.1 riastrad 453 1.3 riastrad typedef struct _ATOM_PPLIB_KV_CLOCK_INFO { 454 1.3 riastrad USHORT usEngineClockLow; 455 1.3 riastrad UCHAR ucEngineClockHigh; 456 1.3 riastrad UCHAR vddcIndex; 457 1.3 riastrad USHORT tdpLimit; 458 1.3 riastrad USHORT rsv1; 459 1.3 riastrad ULONG rsv2[2]; 460 1.3 riastrad } ATOM_PPLIB_KV_CLOCK_INFO; 461 1.3 riastrad 462 1.1 riastrad typedef struct _ATOM_PPLIB_CZ_CLOCK_INFO { 463 1.1 riastrad UCHAR index; 464 1.1 riastrad UCHAR rsv[3]; 465 1.1 riastrad } ATOM_PPLIB_CZ_CLOCK_INFO; 466 1.1 riastrad 467 1.1 riastrad typedef struct _ATOM_PPLIB_STATE_V2 468 1.1 riastrad { 469 1.1 riastrad //number of valid dpm levels in this state; Driver uses it to calculate the whole 470 1.1 riastrad //size of the state: sizeof(ATOM_PPLIB_STATE_V2) + (ucNumDPMLevels - 1) * sizeof(UCHAR) 471 1.1 riastrad UCHAR ucNumDPMLevels; 472 1.1 riastrad 473 1.1 riastrad //a index to the array of nonClockInfos 474 1.1 riastrad UCHAR nonClockInfoIndex; 475 1.1 riastrad /** 476 1.1 riastrad * Driver will read the first ucNumDPMLevels in this array 477 1.1 riastrad */ 478 1.1 riastrad UCHAR clockInfoIndex[1]; 479 1.1 riastrad } ATOM_PPLIB_STATE_V2; 480 1.1 riastrad 481 1.1 riastrad typedef struct _StateArray{ 482 1.1 riastrad //how many states we have 483 1.1 riastrad UCHAR ucNumEntries; 484 1.1 riastrad 485 1.1 riastrad ATOM_PPLIB_STATE_V2 states[1]; 486 1.1 riastrad }StateArray; 487 1.1 riastrad 488 1.1 riastrad 489 1.1 riastrad typedef struct _ClockInfoArray{ 490 1.1 riastrad //how many clock levels we have 491 1.1 riastrad UCHAR ucNumEntries; 492 1.1 riastrad 493 1.1 riastrad //sizeof(ATOM_PPLIB_CLOCK_INFO) 494 1.1 riastrad UCHAR ucEntrySize; 495 1.1 riastrad 496 1.1 riastrad UCHAR clockInfo[1]; 497 1.1 riastrad }ClockInfoArray; 498 1.1 riastrad 499 1.1 riastrad typedef struct _NonClockInfoArray{ 500 1.1 riastrad 501 1.1 riastrad //how many non-clock levels we have. normally should be same as number of states 502 1.1 riastrad UCHAR ucNumEntries; 503 1.1 riastrad //sizeof(ATOM_PPLIB_NONCLOCK_INFO) 504 1.1 riastrad UCHAR ucEntrySize; 505 1.1 riastrad 506 1.1 riastrad ATOM_PPLIB_NONCLOCK_INFO nonClockInfo[1]; 507 1.1 riastrad }NonClockInfoArray; 508 1.1 riastrad 509 1.1 riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Record 510 1.1 riastrad { 511 1.1 riastrad USHORT usClockLow; 512 1.1 riastrad UCHAR ucClockHigh; 513 1.1 riastrad USHORT usVoltage; 514 1.1 riastrad }ATOM_PPLIB_Clock_Voltage_Dependency_Record; 515 1.1 riastrad 516 1.1 riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Dependency_Table 517 1.1 riastrad { 518 1.1 riastrad UCHAR ucNumEntries; // Number of entries. 519 1.1 riastrad ATOM_PPLIB_Clock_Voltage_Dependency_Record entries[1]; // Dynamically allocate entries. 520 1.1 riastrad }ATOM_PPLIB_Clock_Voltage_Dependency_Table; 521 1.1 riastrad 522 1.1 riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Record 523 1.1 riastrad { 524 1.1 riastrad USHORT usSclkLow; 525 1.1 riastrad UCHAR ucSclkHigh; 526 1.1 riastrad USHORT usMclkLow; 527 1.1 riastrad UCHAR ucMclkHigh; 528 1.1 riastrad USHORT usVddc; 529 1.1 riastrad USHORT usVddci; 530 1.1 riastrad }ATOM_PPLIB_Clock_Voltage_Limit_Record; 531 1.1 riastrad 532 1.1 riastrad typedef struct _ATOM_PPLIB_Clock_Voltage_Limit_Table 533 1.1 riastrad { 534 1.1 riastrad UCHAR ucNumEntries; // Number of entries. 535 1.1 riastrad ATOM_PPLIB_Clock_Voltage_Limit_Record entries[1]; // Dynamically allocate entries. 536 1.1 riastrad }ATOM_PPLIB_Clock_Voltage_Limit_Table; 537 1.1 riastrad 538 1.1 riastrad union _ATOM_PPLIB_CAC_Leakage_Record 539 1.1 riastrad { 540 1.1 riastrad struct 541 1.1 riastrad { 542 1.1 riastrad USHORT usVddc; // We use this field for the "fake" standardized VDDC for power calculations; For CI and newer, we use this as the real VDDC value. in CI we read it as StdVoltageHiSidd 543 1.1 riastrad ULONG ulLeakageValue; // For CI and newer we use this as the "fake" standar VDDC value. in CI we read it as StdVoltageLoSidd 544 1.1 riastrad 545 1.1 riastrad }; 546 1.1 riastrad struct 547 1.1 riastrad { 548 1.1 riastrad USHORT usVddc1; 549 1.1 riastrad USHORT usVddc2; 550 1.1 riastrad USHORT usVddc3; 551 1.1 riastrad }; 552 1.1 riastrad }; 553 1.1 riastrad 554 1.1 riastrad typedef union _ATOM_PPLIB_CAC_Leakage_Record ATOM_PPLIB_CAC_Leakage_Record; 555 1.1 riastrad 556 1.1 riastrad typedef struct _ATOM_PPLIB_CAC_Leakage_Table 557 1.1 riastrad { 558 1.1 riastrad UCHAR ucNumEntries; // Number of entries. 559 1.1 riastrad ATOM_PPLIB_CAC_Leakage_Record entries[1]; // Dynamically allocate entries. 560 1.1 riastrad }ATOM_PPLIB_CAC_Leakage_Table; 561 1.1 riastrad 562 1.1 riastrad typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Record 563 1.1 riastrad { 564 1.1 riastrad USHORT usVoltage; 565 1.1 riastrad USHORT usSclkLow; 566 1.1 riastrad UCHAR ucSclkHigh; 567 1.1 riastrad USHORT usMclkLow; 568 1.1 riastrad UCHAR ucMclkHigh; 569 1.1 riastrad }ATOM_PPLIB_PhaseSheddingLimits_Record; 570 1.1 riastrad 571 1.1 riastrad typedef struct _ATOM_PPLIB_PhaseSheddingLimits_Table 572 1.1 riastrad { 573 1.1 riastrad UCHAR ucNumEntries; // Number of entries. 574 1.1 riastrad ATOM_PPLIB_PhaseSheddingLimits_Record entries[1]; // Dynamically allocate entries. 575 1.1 riastrad }ATOM_PPLIB_PhaseSheddingLimits_Table; 576 1.1 riastrad 577 1.1 riastrad typedef struct _VCEClockInfo{ 578 1.1 riastrad USHORT usEVClkLow; 579 1.1 riastrad UCHAR ucEVClkHigh; 580 1.1 riastrad USHORT usECClkLow; 581 1.1 riastrad UCHAR ucECClkHigh; 582 1.1 riastrad }VCEClockInfo; 583 1.1 riastrad 584 1.1 riastrad typedef struct _VCEClockInfoArray{ 585 1.1 riastrad UCHAR ucNumEntries; 586 1.1 riastrad VCEClockInfo entries[1]; 587 1.1 riastrad }VCEClockInfoArray; 588 1.1 riastrad 589 1.1 riastrad typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record 590 1.1 riastrad { 591 1.1 riastrad USHORT usVoltage; 592 1.1 riastrad UCHAR ucVCEClockInfoIndex; 593 1.1 riastrad }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record; 594 1.1 riastrad 595 1.1 riastrad typedef struct _ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table 596 1.1 riastrad { 597 1.1 riastrad UCHAR numEntries; 598 1.1 riastrad ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record entries[1]; 599 1.1 riastrad }ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table; 600 1.1 riastrad 601 1.1 riastrad typedef struct _ATOM_PPLIB_VCE_State_Record 602 1.1 riastrad { 603 1.1 riastrad UCHAR ucVCEClockInfoIndex; 604 1.1 riastrad UCHAR ucClockInfoIndex; //highest 2 bits indicates memory p-states, lower 6bits indicates index to ClockInfoArrary 605 1.1 riastrad }ATOM_PPLIB_VCE_State_Record; 606 1.1 riastrad 607 1.1 riastrad typedef struct _ATOM_PPLIB_VCE_State_Table 608 1.1 riastrad { 609 1.1 riastrad UCHAR numEntries; 610 1.1 riastrad ATOM_PPLIB_VCE_State_Record entries[1]; 611 1.1 riastrad }ATOM_PPLIB_VCE_State_Table; 612 1.1 riastrad 613 1.1 riastrad 614 1.1 riastrad typedef struct _ATOM_PPLIB_VCE_Table 615 1.1 riastrad { 616 1.1 riastrad UCHAR revid; 617 1.1 riastrad // VCEClockInfoArray array; 618 1.1 riastrad // ATOM_PPLIB_VCE_Clock_Voltage_Limit_Table limits; 619 1.1 riastrad // ATOM_PPLIB_VCE_State_Table states; 620 1.1 riastrad }ATOM_PPLIB_VCE_Table; 621 1.1 riastrad 622 1.1 riastrad 623 1.1 riastrad typedef struct _UVDClockInfo{ 624 1.1 riastrad USHORT usVClkLow; 625 1.1 riastrad UCHAR ucVClkHigh; 626 1.1 riastrad USHORT usDClkLow; 627 1.1 riastrad UCHAR ucDClkHigh; 628 1.1 riastrad }UVDClockInfo; 629 1.1 riastrad 630 1.1 riastrad typedef struct _UVDClockInfoArray{ 631 1.1 riastrad UCHAR ucNumEntries; 632 1.1 riastrad UVDClockInfo entries[1]; 633 1.1 riastrad }UVDClockInfoArray; 634 1.1 riastrad 635 1.1 riastrad typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record 636 1.1 riastrad { 637 1.1 riastrad USHORT usVoltage; 638 1.1 riastrad UCHAR ucUVDClockInfoIndex; 639 1.1 riastrad }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record; 640 1.1 riastrad 641 1.1 riastrad typedef struct _ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table 642 1.1 riastrad { 643 1.1 riastrad UCHAR numEntries; 644 1.1 riastrad ATOM_PPLIB_UVD_Clock_Voltage_Limit_Record entries[1]; 645 1.1 riastrad }ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table; 646 1.1 riastrad 647 1.1 riastrad typedef struct _ATOM_PPLIB_UVD_Table 648 1.1 riastrad { 649 1.1 riastrad UCHAR revid; 650 1.1 riastrad // UVDClockInfoArray array; 651 1.1 riastrad // ATOM_PPLIB_UVD_Clock_Voltage_Limit_Table limits; 652 1.1 riastrad }ATOM_PPLIB_UVD_Table; 653 1.1 riastrad 654 1.1 riastrad typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Record 655 1.1 riastrad { 656 1.1 riastrad USHORT usVoltage; 657 1.1 riastrad USHORT usSAMClockLow; 658 1.1 riastrad UCHAR ucSAMClockHigh; 659 1.1 riastrad }ATOM_PPLIB_SAMClk_Voltage_Limit_Record; 660 1.1 riastrad 661 1.1 riastrad typedef struct _ATOM_PPLIB_SAMClk_Voltage_Limit_Table{ 662 1.1 riastrad UCHAR numEntries; 663 1.1 riastrad ATOM_PPLIB_SAMClk_Voltage_Limit_Record entries[1]; 664 1.1 riastrad }ATOM_PPLIB_SAMClk_Voltage_Limit_Table; 665 1.1 riastrad 666 1.1 riastrad typedef struct _ATOM_PPLIB_SAMU_Table 667 1.1 riastrad { 668 1.1 riastrad UCHAR revid; 669 1.1 riastrad ATOM_PPLIB_SAMClk_Voltage_Limit_Table limits; 670 1.1 riastrad }ATOM_PPLIB_SAMU_Table; 671 1.1 riastrad 672 1.1 riastrad typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Record 673 1.1 riastrad { 674 1.1 riastrad USHORT usVoltage; 675 1.1 riastrad USHORT usACPClockLow; 676 1.1 riastrad UCHAR ucACPClockHigh; 677 1.1 riastrad }ATOM_PPLIB_ACPClk_Voltage_Limit_Record; 678 1.1 riastrad 679 1.1 riastrad typedef struct _ATOM_PPLIB_ACPClk_Voltage_Limit_Table{ 680 1.1 riastrad UCHAR numEntries; 681 1.1 riastrad ATOM_PPLIB_ACPClk_Voltage_Limit_Record entries[1]; 682 1.1 riastrad }ATOM_PPLIB_ACPClk_Voltage_Limit_Table; 683 1.1 riastrad 684 1.1 riastrad typedef struct _ATOM_PPLIB_ACP_Table 685 1.1 riastrad { 686 1.1 riastrad UCHAR revid; 687 1.1 riastrad ATOM_PPLIB_ACPClk_Voltage_Limit_Table limits; 688 1.1 riastrad }ATOM_PPLIB_ACP_Table; 689 1.1 riastrad 690 1.1 riastrad typedef struct _ATOM_PowerTune_Table{ 691 1.1 riastrad USHORT usTDP; 692 1.1 riastrad USHORT usConfigurableTDP; 693 1.1 riastrad USHORT usTDC; 694 1.1 riastrad USHORT usBatteryPowerLimit; 695 1.1 riastrad USHORT usSmallPowerLimit; 696 1.1 riastrad USHORT usLowCACLeakage; 697 1.1 riastrad USHORT usHighCACLeakage; 698 1.1 riastrad }ATOM_PowerTune_Table; 699 1.1 riastrad 700 1.1 riastrad typedef struct _ATOM_PPLIB_POWERTUNE_Table 701 1.1 riastrad { 702 1.1 riastrad UCHAR revid; 703 1.1 riastrad ATOM_PowerTune_Table power_tune_table; 704 1.1 riastrad }ATOM_PPLIB_POWERTUNE_Table; 705 1.1 riastrad 706 1.1 riastrad typedef struct _ATOM_PPLIB_POWERTUNE_Table_V1 707 1.1 riastrad { 708 1.1 riastrad UCHAR revid; 709 1.1 riastrad ATOM_PowerTune_Table power_tune_table; 710 1.1 riastrad USHORT usMaximumPowerDeliveryLimit; 711 1.1 riastrad USHORT usTjMax; 712 1.1 riastrad USHORT usReserve[6]; 713 1.1 riastrad } ATOM_PPLIB_POWERTUNE_Table_V1; 714 1.1 riastrad 715 1.1 riastrad #define ATOM_PPM_A_A 1 716 1.1 riastrad #define ATOM_PPM_A_I 2 717 1.1 riastrad typedef struct _ATOM_PPLIB_PPM_Table 718 1.1 riastrad { 719 1.1 riastrad UCHAR ucRevId; 720 1.1 riastrad UCHAR ucPpmDesign; //A+I or A+A 721 1.1 riastrad USHORT usCpuCoreNumber; 722 1.1 riastrad ULONG ulPlatformTDP; 723 1.1 riastrad ULONG ulSmallACPlatformTDP; 724 1.1 riastrad ULONG ulPlatformTDC; 725 1.1 riastrad ULONG ulSmallACPlatformTDC; 726 1.1 riastrad ULONG ulApuTDP; 727 1.1 riastrad ULONG ulDGpuTDP; 728 1.1 riastrad ULONG ulDGpuUlvPower; 729 1.1 riastrad ULONG ulTjmax; 730 1.1 riastrad } ATOM_PPLIB_PPM_Table; 731 1.1 riastrad 732 1.3 riastrad #define VQ_DisplayConfig_NoneAWD 1 733 1.3 riastrad #define VQ_DisplayConfig_AWD 2 734 1.3 riastrad 735 1.3 riastrad typedef struct ATOM_PPLIB_VQ_Budgeting_Record{ 736 1.3 riastrad ULONG ulDeviceID; 737 1.3 riastrad ULONG ulSustainableSOCPowerLimitLow; /* in mW */ 738 1.3 riastrad ULONG ulSustainableSOCPowerLimitHigh; /* in mW */ 739 1.3 riastrad 740 1.3 riastrad ULONG ulDClk; 741 1.3 riastrad ULONG ulEClk; 742 1.3 riastrad ULONG ulDispSclk; 743 1.3 riastrad UCHAR ucDispConfig; 744 1.3 riastrad 745 1.3 riastrad } ATOM_PPLIB_VQ_Budgeting_Record; 746 1.3 riastrad 747 1.3 riastrad typedef struct ATOM_PPLIB_VQ_Budgeting_Table { 748 1.3 riastrad UCHAR revid; 749 1.3 riastrad UCHAR numEntries; 750 1.3 riastrad ATOM_PPLIB_VQ_Budgeting_Record entries[1]; 751 1.3 riastrad } ATOM_PPLIB_VQ_Budgeting_Table; 752 1.3 riastrad 753 1.1 riastrad #pragma pack() 754 1.1 riastrad 755 1.1 riastrad #endif 756