vega10_ppsmc.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * Copyright 2016 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 PP_SMC_H
  24. #define PP_SMC_H
  25. #pragma pack(push, 1)
  26. #define SMU_UCODE_VERSION 0x001c0800
  27. /* SMU Response Codes: */
  28. #define PPSMC_Result_OK 0x1
  29. #define PPSMC_Result_Failed 0xFF
  30. #define PPSMC_Result_UnknownCmd 0xFE
  31. #define PPSMC_Result_CmdRejectedPrereq 0xFD
  32. #define PPSMC_Result_CmdRejectedBusy 0xFC
  33. typedef uint16_t PPSMC_Result;
  34. /* Message Definitions */
  35. #define PPSMC_MSG_TestMessage 0x1
  36. #define PPSMC_MSG_GetSmuVersion 0x2
  37. #define PPSMC_MSG_GetDriverIfVersion 0x3
  38. #define PPSMC_MSG_EnableSmuFeatures 0x4
  39. #define PPSMC_MSG_DisableSmuFeatures 0x5
  40. #define PPSMC_MSG_GetEnabledSmuFeatures 0x6
  41. #define PPSMC_MSG_SetWorkloadMask 0x7
  42. #define PPSMC_MSG_SetPptLimit 0x8
  43. #define PPSMC_MSG_SetDriverDramAddrHigh 0x9
  44. #define PPSMC_MSG_SetDriverDramAddrLow 0xA
  45. #define PPSMC_MSG_SetToolsDramAddrHigh 0xB
  46. #define PPSMC_MSG_SetToolsDramAddrLow 0xC
  47. #define PPSMC_MSG_TransferTableSmu2Dram 0xD
  48. #define PPSMC_MSG_TransferTableDram2Smu 0xE
  49. #define PPSMC_MSG_UseDefaultPPTable 0xF
  50. #define PPSMC_MSG_UseBackupPPTable 0x10
  51. #define PPSMC_MSG_RunBtc 0x11
  52. #define PPSMC_MSG_RequestI2CBus 0x12
  53. #define PPSMC_MSG_ReleaseI2CBus 0x13
  54. #define PPSMC_MSG_ConfigureTelemetry 0x14
  55. #define PPSMC_MSG_SetUlvIpMask 0x15
  56. #define PPSMC_MSG_SetSocVidOffset 0x16
  57. #define PPSMC_MSG_SetMemVidOffset 0x17
  58. #define PPSMC_MSG_GetSocVidOffset 0x18
  59. #define PPSMC_MSG_GetMemVidOffset 0x19
  60. #define PPSMC_MSG_SetFloorSocVoltage 0x1A
  61. #define PPSMC_MSG_SoftReset 0x1B
  62. #define PPSMC_MSG_StartBacoMonitor 0x1C
  63. #define PPSMC_MSG_CancelBacoMonitor 0x1D
  64. #define PPSMC_MSG_EnterBaco 0x1E
  65. #define PPSMC_MSG_AllowLowGfxclkInterrupt 0x1F
  66. #define PPSMC_MSG_SetLowGfxclkInterruptThreshold 0x20
  67. #define PPSMC_MSG_SetSoftMinGfxclkByIndex 0x21
  68. #define PPSMC_MSG_SetSoftMaxGfxclkByIndex 0x22
  69. #define PPSMC_MSG_GetCurrentGfxclkIndex 0x23
  70. #define PPSMC_MSG_SetSoftMinUclkByIndex 0x24
  71. #define PPSMC_MSG_SetSoftMaxUclkByIndex 0x25
  72. #define PPSMC_MSG_GetCurrentUclkIndex 0x26
  73. #define PPSMC_MSG_SetSoftMinUvdByIndex 0x27
  74. #define PPSMC_MSG_SetSoftMaxUvdByIndex 0x28
  75. #define PPSMC_MSG_GetCurrentUvdIndex 0x29
  76. #define PPSMC_MSG_SetSoftMinVceByIndex 0x2A
  77. #define PPSMC_MSG_SetSoftMaxVceByIndex 0x2B
  78. #define PPSMC_MSG_SetHardMinVceByIndex 0x2C
  79. #define PPSMC_MSG_GetCurrentVceIndex 0x2D
  80. #define PPSMC_MSG_SetSoftMinSocclkByIndex 0x2E
  81. #define PPSMC_MSG_SetHardMinSocclkByIndex 0x2F
  82. #define PPSMC_MSG_SetSoftMaxSocclkByIndex 0x30
  83. #define PPSMC_MSG_GetCurrentSocclkIndex 0x31
  84. #define PPSMC_MSG_SetMinLinkDpmByIndex 0x32
  85. #define PPSMC_MSG_GetCurrentLinkIndex 0x33
  86. #define PPSMC_MSG_GetAverageGfxclkFrequency 0x34
  87. #define PPSMC_MSG_GetAverageSocclkFrequency 0x35
  88. #define PPSMC_MSG_GetAverageUclkFrequency 0x36
  89. #define PPSMC_MSG_GetAverageGfxActivity 0x37
  90. #define PPSMC_MSG_GetTemperatureEdge 0x38
  91. #define PPSMC_MSG_GetTemperatureHotspot 0x39
  92. #define PPSMC_MSG_GetTemperatureHBM 0x3A
  93. #define PPSMC_MSG_GetTemperatureVrSoc 0x3B
  94. #define PPSMC_MSG_GetTemperatureVrMem 0x3C
  95. #define PPSMC_MSG_GetTemperatureLiquid 0x3D
  96. #define PPSMC_MSG_GetTemperaturePlx 0x3E
  97. #define PPSMC_MSG_OverDriveSetPercentage 0x3F
  98. #define PPSMC_MSG_SetMinDeepSleepDcefclk 0x40
  99. #define PPSMC_MSG_SwitchToAC 0x41
  100. #define PPSMC_MSG_SetUclkFastSwitch 0x42
  101. #define PPSMC_MSG_SetUclkDownHyst 0x43
  102. #define PPSMC_MSG_RemoveDCClamp 0x44
  103. #define PPSMC_MSG_GfxDeviceDriverReset 0x45
  104. #define PPSMC_MSG_GetCurrentRpm 0x46
  105. #define PPSMC_MSG_SetVideoFps 0x47
  106. #define PPSMC_MSG_SetCustomGfxDpmParameters 0x48
  107. #define PPSMC_MSG_SetTjMax 0x49
  108. #define PPSMC_MSG_SetFanTemperatureTarget 0x4A
  109. #define PPSMC_MSG_PrepareMp1ForUnload 0x4B
  110. #define PPSMC_MSG_RequestDisplayClockByFreq 0x4C
  111. #define PPSMC_MSG_GetClockFreqMHz 0x4D
  112. #define PPSMC_MSG_DramLogSetDramAddrHigh 0x4E
  113. #define PPSMC_MSG_DramLogSetDramAddrLow 0x4F
  114. #define PPSMC_MSG_DramLogSetDramSize 0x50
  115. #define PPSMC_MSG_SetFanMaxRpm 0x51
  116. #define PPSMC_MSG_SetFanMinPwm 0x52
  117. #define PPSMC_MSG_ConfigureGfxDidt 0x55
  118. #define PPSMC_MSG_NumOfDisplays 0x56
  119. #define PPSMC_MSG_ReadSerialNumTop32 0x58
  120. #define PPSMC_MSG_ReadSerialNumBottom32 0x59
  121. #define PPSMC_MSG_RunAcgBtc 0x5C
  122. #define PPSMC_MSG_RunAcgInClosedLoop 0x5D
  123. #define PPSMC_MSG_RunAcgInOpenLoop 0x5E
  124. #define PPSMC_MSG_InitializeAcg 0x5F
  125. #define PPSMC_MSG_GetCurrPkgPwr 0x61
  126. #define PPSMC_Message_Count 0x62
  127. typedef int PPSMC_Msg;
  128. #pragma pack(pop)
  129. #endif