root/drivers/gpu/drm/amd/powerplay/inc/smu_types.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright 2019 Advanced Micro Devices, Inc.
   3  *
   4  * Permission is hereby granted, free of charge, to any person obtaining a
   5  * copy of this software and associated documentation files (the "Software"),
   6  * to deal in the Software without restriction, including without limitation
   7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
   8  * and/or sell copies of the Software, and to permit persons to whom the
   9  * Software is furnished to do so, subject to the following conditions:
  10  *
  11  * The above copyright notice and this permission notice shall be included in
  12  * all copies or substantial portions of the Software.
  13  *
  14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  17  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20  * OTHER DEALINGS IN THE SOFTWARE.
  21  */
  22 
  23 #ifndef __SMU_TYPES_H__
  24 #define __SMU_TYPES_H__
  25 
  26 #define SMU_MESSAGE_TYPES                             \
  27        __SMU_DUMMY_MAP(TestMessage),                  \
  28        __SMU_DUMMY_MAP(GetSmuVersion),                \
  29        __SMU_DUMMY_MAP(GetDriverIfVersion),           \
  30        __SMU_DUMMY_MAP(SetAllowedFeaturesMaskLow),    \
  31        __SMU_DUMMY_MAP(SetAllowedFeaturesMaskHigh),   \
  32        __SMU_DUMMY_MAP(EnableAllSmuFeatures),         \
  33        __SMU_DUMMY_MAP(DisableAllSmuFeatures),        \
  34        __SMU_DUMMY_MAP(EnableSmuFeaturesLow),         \
  35        __SMU_DUMMY_MAP(EnableSmuFeaturesHigh),        \
  36        __SMU_DUMMY_MAP(DisableSmuFeaturesLow),        \
  37        __SMU_DUMMY_MAP(DisableSmuFeaturesHigh),       \
  38        __SMU_DUMMY_MAP(GetEnabledSmuFeaturesLow),     \
  39        __SMU_DUMMY_MAP(GetEnabledSmuFeaturesHigh),    \
  40        __SMU_DUMMY_MAP(SetWorkloadMask),              \
  41        __SMU_DUMMY_MAP(SetPptLimit),                  \
  42        __SMU_DUMMY_MAP(SetDriverDramAddrHigh),        \
  43        __SMU_DUMMY_MAP(SetDriverDramAddrLow),         \
  44        __SMU_DUMMY_MAP(SetToolsDramAddrHigh),         \
  45        __SMU_DUMMY_MAP(SetToolsDramAddrLow),          \
  46        __SMU_DUMMY_MAP(TransferTableSmu2Dram),        \
  47        __SMU_DUMMY_MAP(TransferTableDram2Smu),        \
  48        __SMU_DUMMY_MAP(UseDefaultPPTable),            \
  49        __SMU_DUMMY_MAP(UseBackupPPTable),             \
  50        __SMU_DUMMY_MAP(RunBtc),                       \
  51        __SMU_DUMMY_MAP(RequestI2CBus),                \
  52        __SMU_DUMMY_MAP(ReleaseI2CBus),                \
  53        __SMU_DUMMY_MAP(SetFloorSocVoltage),           \
  54        __SMU_DUMMY_MAP(SoftReset),                    \
  55        __SMU_DUMMY_MAP(StartBacoMonitor),             \
  56        __SMU_DUMMY_MAP(CancelBacoMonitor),            \
  57        __SMU_DUMMY_MAP(EnterBaco),                    \
  58        __SMU_DUMMY_MAP(SetSoftMinByFreq),             \
  59        __SMU_DUMMY_MAP(SetSoftMaxByFreq),             \
  60        __SMU_DUMMY_MAP(SetHardMinByFreq),             \
  61        __SMU_DUMMY_MAP(SetHardMaxByFreq),             \
  62        __SMU_DUMMY_MAP(GetMinDpmFreq),                \
  63        __SMU_DUMMY_MAP(GetMaxDpmFreq),                \
  64        __SMU_DUMMY_MAP(GetDpmFreqByIndex),            \
  65        __SMU_DUMMY_MAP(GetDpmClockFreq),              \
  66        __SMU_DUMMY_MAP(GetSsVoltageByDpm),            \
  67        __SMU_DUMMY_MAP(SetMemoryChannelConfig),       \
  68        __SMU_DUMMY_MAP(SetGeminiMode),                \
  69        __SMU_DUMMY_MAP(SetGeminiApertureHigh),        \
  70        __SMU_DUMMY_MAP(SetGeminiApertureLow),         \
  71        __SMU_DUMMY_MAP(SetMinLinkDpmByIndex),         \
  72        __SMU_DUMMY_MAP(OverridePcieParameters),       \
  73        __SMU_DUMMY_MAP(OverDriveSetPercentage),       \
  74        __SMU_DUMMY_MAP(SetMinDeepSleepDcefclk),       \
  75        __SMU_DUMMY_MAP(ReenableAcDcInterrupt),        \
  76        __SMU_DUMMY_MAP(NotifyPowerSource),            \
  77        __SMU_DUMMY_MAP(SetUclkFastSwitch),            \
  78        __SMU_DUMMY_MAP(SetUclkDownHyst),              \
  79        __SMU_DUMMY_MAP(GfxDeviceDriverReset),         \
  80        __SMU_DUMMY_MAP(GetCurrentRpm),                \
  81        __SMU_DUMMY_MAP(SetVideoFps),                  \
  82        __SMU_DUMMY_MAP(SetTjMax),                     \
  83        __SMU_DUMMY_MAP(SetFanTemperatureTarget),      \
  84        __SMU_DUMMY_MAP(PrepareMp1ForUnload),          \
  85        __SMU_DUMMY_MAP(DramLogSetDramAddrHigh),       \
  86        __SMU_DUMMY_MAP(DramLogSetDramAddrLow),        \
  87        __SMU_DUMMY_MAP(DramLogSetDramSize),           \
  88        __SMU_DUMMY_MAP(SetFanMaxRpm),                 \
  89        __SMU_DUMMY_MAP(SetFanMinPwm),                 \
  90        __SMU_DUMMY_MAP(ConfigureGfxDidt),             \
  91        __SMU_DUMMY_MAP(NumOfDisplays),                \
  92        __SMU_DUMMY_MAP(RemoveMargins),                \
  93        __SMU_DUMMY_MAP(ReadSerialNumTop32),           \
  94        __SMU_DUMMY_MAP(ReadSerialNumBottom32),        \
  95        __SMU_DUMMY_MAP(SetSystemVirtualDramAddrHigh), \
  96        __SMU_DUMMY_MAP(SetSystemVirtualDramAddrLow),  \
  97        __SMU_DUMMY_MAP(WaflTest),                     \
  98        __SMU_DUMMY_MAP(SetFclkGfxClkRatio),           \
  99        __SMU_DUMMY_MAP(AllowGfxOff),                  \
 100        __SMU_DUMMY_MAP(DisallowGfxOff),               \
 101        __SMU_DUMMY_MAP(GetPptLimit),                  \
 102        __SMU_DUMMY_MAP(GetDcModeMaxDpmFreq),          \
 103        __SMU_DUMMY_MAP(GetDebugData),                 \
 104        __SMU_DUMMY_MAP(SetXgmiMode),                  \
 105        __SMU_DUMMY_MAP(RunAfllBtc),                   \
 106        __SMU_DUMMY_MAP(ExitBaco),                     \
 107        __SMU_DUMMY_MAP(PrepareMp1ForReset),           \
 108        __SMU_DUMMY_MAP(PrepareMp1ForShutdown),        \
 109        __SMU_DUMMY_MAP(SetMGpuFanBoostLimitRpm),      \
 110        __SMU_DUMMY_MAP(GetAVFSVoltageByDpm),          \
 111        __SMU_DUMMY_MAP(PowerUpVcn),                   \
 112        __SMU_DUMMY_MAP(PowerDownVcn),                 \
 113        __SMU_DUMMY_MAP(PowerUpJpeg),                  \
 114        __SMU_DUMMY_MAP(PowerDownJpeg),                \
 115        __SMU_DUMMY_MAP(BacoAudioD3PME),               \
 116        __SMU_DUMMY_MAP(ArmD3),                        \
 117        __SMU_DUMMY_MAP(RunGfxDcBtc),                  \
 118        __SMU_DUMMY_MAP(RunSocDcBtc),                  \
 119        __SMU_DUMMY_MAP(SetMemoryChannelEnable),       \
 120        __SMU_DUMMY_MAP(SetDfSwitchType),              \
 121        __SMU_DUMMY_MAP(GetVoltageByDpm),              \
 122        __SMU_DUMMY_MAP(GetVoltageByDpmOverdrive),     \
 123        __SMU_DUMMY_MAP(PowerUpVcn0),                  \
 124        __SMU_DUMMY_MAP(PowerDownVcn0),               \
 125        __SMU_DUMMY_MAP(PowerUpVcn1),                  \
 126        __SMU_DUMMY_MAP(PowerDownVcn1),                \
 127        __SMU_DUMMY_MAP(PowerUpGfx),                   \
 128        __SMU_DUMMY_MAP(PowerDownIspByTile),           \
 129        __SMU_DUMMY_MAP(PowerUpIspByTile),             \
 130        __SMU_DUMMY_MAP(PowerDownSdma),                \
 131         __SMU_DUMMY_MAP(PowerUpSdma),                 \
 132         __SMU_DUMMY_MAP(SetHardMinIspclkByFreq),      \
 133         __SMU_DUMMY_MAP(SetHardMinVcn),               \
 134         __SMU_DUMMY_MAP(Spare1),                      \
 135         __SMU_DUMMY_MAP(Spare2),                      \
 136         __SMU_DUMMY_MAP(SetAllowFclkSwitch),          \
 137         __SMU_DUMMY_MAP(SetMinVideoGfxclkFreq),       \
 138         __SMU_DUMMY_MAP(ActiveProcessNotify),         \
 139         __SMU_DUMMY_MAP(SetCustomPolicy),             \
 140         __SMU_DUMMY_MAP(QueryPowerLimit),             \
 141         __SMU_DUMMY_MAP(SetGfxclkOverdriveByFreqVid), \
 142         __SMU_DUMMY_MAP(SetHardMinDcfclkByFreq),      \
 143         __SMU_DUMMY_MAP(SetHardMinSocclkByFreq),      \
 144         __SMU_DUMMY_MAP(ControlIgpuATS),              \
 145         __SMU_DUMMY_MAP(SetMinVideoFclkFreq),         \
 146         __SMU_DUMMY_MAP(SetMinDeepSleepDcfclk),       \
 147         __SMU_DUMMY_MAP(ForcePowerDownGfx),           \
 148         __SMU_DUMMY_MAP(SetPhyclkVoltageByFreq),      \
 149         __SMU_DUMMY_MAP(SetDppclkVoltageByFreq),      \
 150         __SMU_DUMMY_MAP(SetSoftMinVcn),               \
 151         __SMU_DUMMY_MAP(EnablePostCode),              \
 152         __SMU_DUMMY_MAP(GetGfxclkFrequency),          \
 153         __SMU_DUMMY_MAP(GetFclkFrequency),            \
 154         __SMU_DUMMY_MAP(GetMinGfxclkFrequency),       \
 155         __SMU_DUMMY_MAP(GetMaxGfxclkFrequency),       \
 156         __SMU_DUMMY_MAP(SetGfxCGPG),                  \
 157         __SMU_DUMMY_MAP(SetSoftMaxGfxClk),            \
 158         __SMU_DUMMY_MAP(SetHardMinGfxClk),            \
 159         __SMU_DUMMY_MAP(SetSoftMaxSocclkByFreq),      \
 160         __SMU_DUMMY_MAP(SetSoftMaxFclkByFreq),        \
 161         __SMU_DUMMY_MAP(SetSoftMaxVcn),               \
 162         __SMU_DUMMY_MAP(PowerGateMmHub),              \
 163         __SMU_DUMMY_MAP(UpdatePmeRestore),            \
 164         __SMU_DUMMY_MAP(GpuChangeState),              \
 165         __SMU_DUMMY_MAP(SetPowerLimitPercentage),     \
 166         __SMU_DUMMY_MAP(ForceGfxContentSave),         \
 167         __SMU_DUMMY_MAP(EnableTmdp48MHzRefclkPwrDown), \
 168         __SMU_DUMMY_MAP(PowerGateAtHub),              \
 169         __SMU_DUMMY_MAP(SetSoftMinJpeg),              \
 170         __SMU_DUMMY_MAP(SetHardMinFclkByFreq),        \
 171 
 172 #undef __SMU_DUMMY_MAP
 173 #define __SMU_DUMMY_MAP(type)   SMU_MSG_##type
 174 enum smu_message_type {
 175         SMU_MESSAGE_TYPES
 176         SMU_MSG_MAX_COUNT,
 177 };
 178 
 179 enum smu_clk_type {
 180         SMU_GFXCLK,
 181         SMU_VCLK,
 182         SMU_DCLK,
 183         SMU_ECLK,
 184         SMU_SOCCLK,
 185         SMU_UCLK,
 186         SMU_DCEFCLK,
 187         SMU_DISPCLK,
 188         SMU_PIXCLK,
 189         SMU_PHYCLK,
 190         SMU_FCLK,
 191         SMU_SCLK,
 192         SMU_MCLK,
 193         SMU_PCIE,
 194         SMU_OD_SCLK,
 195         SMU_OD_MCLK,
 196         SMU_OD_VDDC_CURVE,
 197         SMU_OD_RANGE,
 198         SMU_CLK_COUNT,
 199 };
 200 
 201 #define SMU_FEATURE_MASKS                               \
 202        __SMU_DUMMY_MAP(DPM_PREFETCHER),                 \
 203        __SMU_DUMMY_MAP(DPM_GFXCLK),                     \
 204        __SMU_DUMMY_MAP(DPM_UCLK),                       \
 205        __SMU_DUMMY_MAP(DPM_SOCCLK),                     \
 206        __SMU_DUMMY_MAP(DPM_UVD),                        \
 207        __SMU_DUMMY_MAP(DPM_VCE),                        \
 208        __SMU_DUMMY_MAP(ULV),                            \
 209        __SMU_DUMMY_MAP(DPM_MP0CLK),                     \
 210        __SMU_DUMMY_MAP(DPM_LINK),                       \
 211        __SMU_DUMMY_MAP(DPM_DCEFCLK),                    \
 212        __SMU_DUMMY_MAP(DS_GFXCLK),                      \
 213        __SMU_DUMMY_MAP(DS_SOCCLK),                      \
 214        __SMU_DUMMY_MAP(DS_LCLK),                        \
 215        __SMU_DUMMY_MAP(PPT),                            \
 216        __SMU_DUMMY_MAP(TDC),                            \
 217        __SMU_DUMMY_MAP(THERMAL),                        \
 218        __SMU_DUMMY_MAP(GFX_PER_CU_CG),                  \
 219        __SMU_DUMMY_MAP(RM),                             \
 220        __SMU_DUMMY_MAP(DS_DCEFCLK),                     \
 221        __SMU_DUMMY_MAP(ACDC),                           \
 222        __SMU_DUMMY_MAP(VR0HOT),                         \
 223        __SMU_DUMMY_MAP(VR1HOT),                         \
 224        __SMU_DUMMY_MAP(FW_CTF),                         \
 225        __SMU_DUMMY_MAP(LED_DISPLAY),                    \
 226        __SMU_DUMMY_MAP(FAN_CONTROL),                    \
 227        __SMU_DUMMY_MAP(GFX_EDC),                        \
 228        __SMU_DUMMY_MAP(GFXOFF),                         \
 229        __SMU_DUMMY_MAP(CG),                             \
 230        __SMU_DUMMY_MAP(DPM_FCLK),                       \
 231        __SMU_DUMMY_MAP(DS_FCLK),                        \
 232        __SMU_DUMMY_MAP(DS_MP1CLK),                      \
 233        __SMU_DUMMY_MAP(DS_MP0CLK),                      \
 234        __SMU_DUMMY_MAP(XGMI),                           \
 235        __SMU_DUMMY_MAP(DPM_GFX_PACE),                   \
 236        __SMU_DUMMY_MAP(MEM_VDDCI_SCALING),              \
 237        __SMU_DUMMY_MAP(MEM_MVDD_SCALING),               \
 238        __SMU_DUMMY_MAP(DS_UCLK),                        \
 239        __SMU_DUMMY_MAP(GFX_ULV),                        \
 240        __SMU_DUMMY_MAP(FW_DSTATE),                      \
 241        __SMU_DUMMY_MAP(BACO),                           \
 242        __SMU_DUMMY_MAP(VCN_PG),                         \
 243        __SMU_DUMMY_MAP(JPEG_PG),                        \
 244        __SMU_DUMMY_MAP(USB_PG),                         \
 245        __SMU_DUMMY_MAP(RSMU_SMN_CG),                    \
 246        __SMU_DUMMY_MAP(APCC_PLUS),                      \
 247        __SMU_DUMMY_MAP(GTHR),                           \
 248        __SMU_DUMMY_MAP(GFX_DCS),                        \
 249        __SMU_DUMMY_MAP(GFX_SS),                         \
 250        __SMU_DUMMY_MAP(OUT_OF_BAND_MONITOR),            \
 251        __SMU_DUMMY_MAP(TEMP_DEPENDENT_VMIN),            \
 252        __SMU_DUMMY_MAP(MMHUB_PG),                       \
 253        __SMU_DUMMY_MAP(ATHUB_PG),                       \
 254        __SMU_DUMMY_MAP(WAFL_CG),
 255 
 256 #undef __SMU_DUMMY_MAP
 257 #define __SMU_DUMMY_MAP(feature)        SMU_FEATURE_##feature##_BIT
 258 enum smu_feature_mask {
 259         SMU_FEATURE_MASKS
 260         SMU_FEATURE_COUNT,
 261 };
 262 
 263 #endif

/* [<][>][^][v][top][bottom][index][help] */