smu8_fusion.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * Copyright 2014 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 SMU8_FUSION_H
  24. #define SMU8_FUSION_H
  25. #include "smu8.h"
  26. #pragma pack(push, 1)
  27. #define SMU8_MAX_CUS 2
  28. #define SMU8_PSMS_PER_CU 4
  29. #define SMU8_CACS_PER_CU 4
  30. struct SMU8_GfxCuPgScoreboard {
  31. uint8_t Enabled;
  32. uint8_t spare[3];
  33. };
  34. struct SMU8_Port80MonitorTable {
  35. uint32_t MmioAddress;
  36. uint32_t MemoryBaseHi;
  37. uint32_t MemoryBaseLo;
  38. uint16_t MemoryBufferSize;
  39. uint16_t MemoryPosition;
  40. uint16_t PollingInterval;
  41. uint8_t EnableCsrShadow;
  42. uint8_t EnableDramShadow;
  43. };
  44. /* Clock Table Definitions */
  45. #define NUM_SCLK_LEVELS 8
  46. #define NUM_LCLK_LEVELS 8
  47. #define NUM_UVD_LEVELS 8
  48. #define NUM_ECLK_LEVELS 8
  49. #define NUM_ACLK_LEVELS 8
  50. struct SMU8_Fusion_ClkLevel {
  51. uint8_t GnbVid;
  52. uint8_t GfxVid;
  53. uint8_t DfsDid;
  54. uint8_t DeepSleepDid;
  55. uint32_t DfsBypass;
  56. uint32_t Frequency;
  57. };
  58. struct SMU8_Fusion_SclkBreakdownTable {
  59. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_SCLK_LEVELS];
  60. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  61. /* SMU8_Fusion_ClkLevel PwrOffLevel; */
  62. uint32_t SclkValidMask;
  63. uint32_t MaxSclkIndex;
  64. };
  65. struct SMU8_Fusion_LclkBreakdownTable {
  66. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_LCLK_LEVELS];
  67. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  68. /* SMU8_Fusion_ClkLevel PwrOffLevel; */
  69. uint32_t LclkValidMask;
  70. uint32_t MaxLclkIndex;
  71. };
  72. struct SMU8_Fusion_EclkBreakdownTable {
  73. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_ECLK_LEVELS];
  74. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  75. struct SMU8_Fusion_ClkLevel PwrOffLevel;
  76. uint32_t EclkValidMask;
  77. uint32_t MaxEclkIndex;
  78. };
  79. struct SMU8_Fusion_VclkBreakdownTable {
  80. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_UVD_LEVELS];
  81. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  82. struct SMU8_Fusion_ClkLevel PwrOffLevel;
  83. uint32_t VclkValidMask;
  84. uint32_t MaxVclkIndex;
  85. };
  86. struct SMU8_Fusion_DclkBreakdownTable {
  87. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_UVD_LEVELS];
  88. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  89. struct SMU8_Fusion_ClkLevel PwrOffLevel;
  90. uint32_t DclkValidMask;
  91. uint32_t MaxDclkIndex;
  92. };
  93. struct SMU8_Fusion_AclkBreakdownTable {
  94. struct SMU8_Fusion_ClkLevel ClkLevel[NUM_ACLK_LEVELS];
  95. struct SMU8_Fusion_ClkLevel DpmOffLevel;
  96. struct SMU8_Fusion_ClkLevel PwrOffLevel;
  97. uint32_t AclkValidMask;
  98. uint32_t MaxAclkIndex;
  99. };
  100. struct SMU8_Fusion_ClkTable {
  101. struct SMU8_Fusion_SclkBreakdownTable SclkBreakdownTable;
  102. struct SMU8_Fusion_LclkBreakdownTable LclkBreakdownTable;
  103. struct SMU8_Fusion_EclkBreakdownTable EclkBreakdownTable;
  104. struct SMU8_Fusion_VclkBreakdownTable VclkBreakdownTable;
  105. struct SMU8_Fusion_DclkBreakdownTable DclkBreakdownTable;
  106. struct SMU8_Fusion_AclkBreakdownTable AclkBreakdownTable;
  107. };
  108. #pragma pack(pop)
  109. #endif