Path: blob/master/drivers/gpu/drm/amd/pm/legacy-dpm/ppsmc.h
26535 views
/*1* Copyright 2011 Advanced Micro Devices, Inc.2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21*/22#ifndef PP_SMC_H23#define PP_SMC_H2425#pragma pack(push, 1)2627#define PPSMC_SWSTATE_FLAG_DC 0x0128#define PPSMC_SWSTATE_FLAG_UVD 0x0229#define PPSMC_SWSTATE_FLAG_VCE 0x0430#define PPSMC_SWSTATE_FLAG_PCIE_X1 0x083132#define PPSMC_THERMAL_PROTECT_TYPE_INTERNAL 0x0033#define PPSMC_THERMAL_PROTECT_TYPE_EXTERNAL 0x0134#define PPSMC_THERMAL_PROTECT_TYPE_NONE 0xff3536#define PPSMC_SYSTEMFLAG_GPIO_DC 0x0137#define PPSMC_SYSTEMFLAG_STEPVDDC 0x0238#define PPSMC_SYSTEMFLAG_GDDR5 0x0439#define PPSMC_SYSTEMFLAG_DISABLE_BABYSTEP 0x0840#define PPSMC_SYSTEMFLAG_REGULATOR_HOT 0x1041#define PPSMC_SYSTEMFLAG_REGULATOR_HOT_ANALOG 0x2042#define PPSMC_SYSTEMFLAG_REGULATOR_HOT_PROG_GPIO 0x404344#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_MASK 0x0745#define PPSMC_EXTRAFLAGS_AC2DC_DONT_WAIT_FOR_VBLANK 0x0846#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_GOTODPMLOWSTATE 0x0047#define PPSMC_EXTRAFLAGS_AC2DC_ACTION_GOTOINITIALSTATE 0x0148#define PPSMC_EXTRAFLAGS_AC2DC_GPIO5_POLARITY_HIGH 0x024950#define PPSMC_DISPLAY_WATERMARK_LOW 051#define PPSMC_DISPLAY_WATERMARK_HIGH 15253#define PPSMC_STATEFLAG_AUTO_PULSE_SKIP 0x0154#define PPSMC_STATEFLAG_POWERBOOST 0x0255#define PPSMC_STATEFLAG_DEEPSLEEP_THROTTLE 0x2056#define PPSMC_STATEFLAG_DEEPSLEEP_BYPASS 0x405758#define FDO_MODE_HARDWARE 059#define FDO_MODE_PIECE_WISE_LINEAR 16061enum FAN_CONTROL {62FAN_CONTROL_FUZZY,63FAN_CONTROL_TABLE64};6566#define PPSMC_Result_OK ((uint8_t)0x01)67#define PPSMC_Result_Failed ((uint8_t)0xFF)6869typedef uint8_t PPSMC_Result;7071#define PPSMC_MSG_Halt ((uint8_t)0x10)72#define PPSMC_MSG_Resume ((uint8_t)0x11)73#define PPSMC_MSG_ZeroLevelsDisabled ((uint8_t)0x13)74#define PPSMC_MSG_OneLevelsDisabled ((uint8_t)0x14)75#define PPSMC_MSG_TwoLevelsDisabled ((uint8_t)0x15)76#define PPSMC_MSG_EnableThermalInterrupt ((uint8_t)0x16)77#define PPSMC_MSG_RunningOnAC ((uint8_t)0x17)78#define PPSMC_MSG_SwitchToSwState ((uint8_t)0x20)79#define PPSMC_MSG_SwitchToInitialState ((uint8_t)0x40)80#define PPSMC_MSG_NoForcedLevel ((uint8_t)0x41)81#define PPSMC_MSG_ForceHigh ((uint8_t)0x42)82#define PPSMC_MSG_ForceMediumOrHigh ((uint8_t)0x43)83#define PPSMC_MSG_SwitchToMinimumPower ((uint8_t)0x51)84#define PPSMC_MSG_ResumeFromMinimumPower ((uint8_t)0x52)85#define PPSMC_MSG_EnableCac ((uint8_t)0x53)86#define PPSMC_MSG_DisableCac ((uint8_t)0x54)87#define PPSMC_TDPClampingActive ((uint8_t)0x59)88#define PPSMC_TDPClampingInactive ((uint8_t)0x5A)89#define PPSMC_StartFanControl ((uint8_t)0x5B)90#define PPSMC_StopFanControl ((uint8_t)0x5C)91#define PPSMC_MSG_NoDisplay ((uint8_t)0x5D)92#define PPSMC_NoDisplay ((uint8_t)0x5D)93#define PPSMC_MSG_HasDisplay ((uint8_t)0x5E)94#define PPSMC_HasDisplay ((uint8_t)0x5E)95#define PPSMC_MSG_UVDPowerOFF ((uint8_t)0x60)96#define PPSMC_MSG_UVDPowerON ((uint8_t)0x61)97#define PPSMC_MSG_EnableULV ((uint8_t)0x62)98#define PPSMC_MSG_DisableULV ((uint8_t)0x63)99#define PPSMC_MSG_EnterULV ((uint8_t)0x64)100#define PPSMC_MSG_ExitULV ((uint8_t)0x65)101#define PPSMC_CACLongTermAvgEnable ((uint8_t)0x6E)102#define PPSMC_CACLongTermAvgDisable ((uint8_t)0x6F)103#define PPSMC_MSG_CollectCAC_PowerCorreln ((uint8_t)0x7A)104#define PPSMC_FlushDataCache ((uint8_t)0x80)105#define PPSMC_MSG_SetEnabledLevels ((uint8_t)0x82)106#define PPSMC_MSG_SetForcedLevels ((uint8_t)0x83)107#define PPSMC_MSG_ResetToDefaults ((uint8_t)0x84)108#define PPSMC_MSG_EnableDTE ((uint8_t)0x87)109#define PPSMC_MSG_DisableDTE ((uint8_t)0x88)110#define PPSMC_MSG_ThrottleOVRDSCLKDS ((uint8_t)0x96)111#define PPSMC_MSG_CancelThrottleOVRDSCLKDS ((uint8_t)0x97)112#define PPSMC_MSG_EnableACDCGPIOInterrupt ((uint16_t) 0x149)113114/* CI/KV/KB */115#define PPSMC_MSG_UVDDPM_SetEnabledMask ((uint16_t) 0x12D)116#define PPSMC_MSG_VCEDPM_SetEnabledMask ((uint16_t) 0x12E)117#define PPSMC_MSG_ACPDPM_SetEnabledMask ((uint16_t) 0x12F)118#define PPSMC_MSG_SAMUDPM_SetEnabledMask ((uint16_t) 0x130)119#define PPSMC_MSG_MCLKDPM_ForceState ((uint16_t) 0x131)120#define PPSMC_MSG_MCLKDPM_NoForcedLevel ((uint16_t) 0x132)121#define PPSMC_MSG_Thermal_Cntl_Disable ((uint16_t) 0x133)122#define PPSMC_MSG_Voltage_Cntl_Disable ((uint16_t) 0x135)123#define PPSMC_MSG_PCIeDPM_Enable ((uint16_t) 0x136)124#define PPSMC_MSG_PCIeDPM_Disable ((uint16_t) 0x13d)125#define PPSMC_MSG_ACPPowerOFF ((uint16_t) 0x137)126#define PPSMC_MSG_ACPPowerON ((uint16_t) 0x138)127#define PPSMC_MSG_SAMPowerOFF ((uint16_t) 0x139)128#define PPSMC_MSG_SAMPowerON ((uint16_t) 0x13a)129#define PPSMC_MSG_PCIeDPM_Disable ((uint16_t) 0x13d)130#define PPSMC_MSG_NBDPM_Enable ((uint16_t) 0x140)131#define PPSMC_MSG_NBDPM_Disable ((uint16_t) 0x141)132#define PPSMC_MSG_SCLKDPM_SetEnabledMask ((uint16_t) 0x145)133#define PPSMC_MSG_MCLKDPM_SetEnabledMask ((uint16_t) 0x146)134#define PPSMC_MSG_PCIeDPM_ForceLevel ((uint16_t) 0x147)135#define PPSMC_MSG_PCIeDPM_UnForceLevel ((uint16_t) 0x148)136#define PPSMC_MSG_EnableVRHotGPIOInterrupt ((uint16_t) 0x14a)137#define PPSMC_MSG_DPM_Enable ((uint16_t) 0x14e)138#define PPSMC_MSG_DPM_Disable ((uint16_t) 0x14f)139#define PPSMC_MSG_MCLKDPM_Enable ((uint16_t) 0x150)140#define PPSMC_MSG_MCLKDPM_Disable ((uint16_t) 0x151)141#define PPSMC_MSG_UVDDPM_Enable ((uint16_t) 0x154)142#define PPSMC_MSG_UVDDPM_Disable ((uint16_t) 0x155)143#define PPSMC_MSG_SAMUDPM_Enable ((uint16_t) 0x156)144#define PPSMC_MSG_SAMUDPM_Disable ((uint16_t) 0x157)145#define PPSMC_MSG_ACPDPM_Enable ((uint16_t) 0x158)146#define PPSMC_MSG_ACPDPM_Disable ((uint16_t) 0x159)147#define PPSMC_MSG_VCEDPM_Enable ((uint16_t) 0x15a)148#define PPSMC_MSG_VCEDPM_Disable ((uint16_t) 0x15b)149#define PPSMC_MSG_VddC_Request ((uint16_t) 0x15f)150#define PPSMC_MSG_SCLKDPM_GetEnabledMask ((uint16_t) 0x162)151#define PPSMC_MSG_PCIeDPM_SetEnabledMask ((uint16_t) 0x167)152#define PPSMC_MSG_TDCLimitEnable ((uint16_t) 0x169)153#define PPSMC_MSG_TDCLimitDisable ((uint16_t) 0x16a)154#define PPSMC_MSG_PkgPwrLimitEnable ((uint16_t) 0x185)155#define PPSMC_MSG_PkgPwrLimitDisable ((uint16_t) 0x186)156#define PPSMC_MSG_PkgPwrSetLimit ((uint16_t) 0x187)157#define PPSMC_MSG_OverDriveSetTargetTdp ((uint16_t) 0x188)158#define PPSMC_MSG_SCLKDPM_FreezeLevel ((uint16_t) 0x189)159#define PPSMC_MSG_SCLKDPM_UnfreezeLevel ((uint16_t) 0x18A)160#define PPSMC_MSG_MCLKDPM_FreezeLevel ((uint16_t) 0x18B)161#define PPSMC_MSG_MCLKDPM_UnfreezeLevel ((uint16_t) 0x18C)162#define PPSMC_MSG_MASTER_DeepSleep_ON ((uint16_t) 0x18F)163#define PPSMC_MSG_MASTER_DeepSleep_OFF ((uint16_t) 0x190)164#define PPSMC_MSG_Remove_DC_Clamp ((uint16_t) 0x191)165#define PPSMC_MSG_SetFanPwmMax ((uint16_t) 0x19A)166#define PPSMC_MSG_SetFanRpmMax ((uint16_t) 0x205)167168#define PPSMC_MSG_ENABLE_THERMAL_DPM ((uint16_t) 0x19C)169#define PPSMC_MSG_DISABLE_THERMAL_DPM ((uint16_t) 0x19D)170171#define PPSMC_MSG_API_GetSclkFrequency ((uint16_t) 0x200)172#define PPSMC_MSG_API_GetMclkFrequency ((uint16_t) 0x201)173174/* TN */175#define PPSMC_MSG_DPM_Config ((uint32_t) 0x102)176#define PPSMC_MSG_DPM_ForceState ((uint32_t) 0x104)177#define PPSMC_MSG_PG_SIMD_Config ((uint32_t) 0x108)178#define PPSMC_MSG_Voltage_Cntl_Enable ((uint32_t) 0x109)179#define PPSMC_MSG_Thermal_Cntl_Enable ((uint32_t) 0x10a)180#define PPSMC_MSG_VCEPowerOFF ((uint32_t) 0x10e)181#define PPSMC_MSG_VCEPowerON ((uint32_t) 0x10f)182#define PPSMC_MSG_DPM_N_LevelsDisabled ((uint32_t) 0x112)183#define PPSMC_MSG_DCE_RemoveVoltageAdjustment ((uint32_t) 0x11d)184#define PPSMC_MSG_DCE_AllowVoltageAdjustment ((uint32_t) 0x11e)185#define PPSMC_MSG_EnableBAPM ((uint32_t) 0x120)186#define PPSMC_MSG_DisableBAPM ((uint32_t) 0x121)187#define PPSMC_MSG_UVD_DPM_Config ((uint32_t) 0x124)188189#define PPSMC_MSG_DRV_DRAM_ADDR_HI ((uint16_t) 0x250)190#define PPSMC_MSG_DRV_DRAM_ADDR_LO ((uint16_t) 0x251)191#define PPSMC_MSG_SMU_DRAM_ADDR_HI ((uint16_t) 0x252)192#define PPSMC_MSG_SMU_DRAM_ADDR_LO ((uint16_t) 0x253)193#define PPSMC_MSG_LoadUcodes ((uint16_t) 0x254)194195typedef uint16_t PPSMC_Msg;196197#pragma pack(pop)198199#endif200201202