kfd_pm4_opcodes.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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 KFD_PM4_OPCODES_H
  24. #define KFD_PM4_OPCODES_H
  25. enum it_opcode_type {
  26. IT_NOP = 0x10,
  27. IT_SET_BASE = 0x11,
  28. IT_CLEAR_STATE = 0x12,
  29. IT_INDEX_BUFFER_SIZE = 0x13,
  30. IT_DISPATCH_DIRECT = 0x15,
  31. IT_DISPATCH_INDIRECT = 0x16,
  32. IT_ATOMIC_GDS = 0x1D,
  33. IT_OCCLUSION_QUERY = 0x1F,
  34. IT_SET_PREDICATION = 0x20,
  35. IT_REG_RMW = 0x21,
  36. IT_COND_EXEC = 0x22,
  37. IT_PRED_EXEC = 0x23,
  38. IT_DRAW_INDIRECT = 0x24,
  39. IT_DRAW_INDEX_INDIRECT = 0x25,
  40. IT_INDEX_BASE = 0x26,
  41. IT_DRAW_INDEX_2 = 0x27,
  42. IT_CONTEXT_CONTROL = 0x28,
  43. IT_INDEX_TYPE = 0x2A,
  44. IT_DRAW_INDIRECT_MULTI = 0x2C,
  45. IT_DRAW_INDEX_AUTO = 0x2D,
  46. IT_NUM_INSTANCES = 0x2F,
  47. IT_DRAW_INDEX_MULTI_AUTO = 0x30,
  48. IT_INDIRECT_BUFFER_CNST = 0x33,
  49. IT_STRMOUT_BUFFER_UPDATE = 0x34,
  50. IT_DRAW_INDEX_OFFSET_2 = 0x35,
  51. IT_DRAW_PREAMBLE = 0x36,
  52. IT_WRITE_DATA = 0x37,
  53. IT_DRAW_INDEX_INDIRECT_MULTI = 0x38,
  54. IT_MEM_SEMAPHORE = 0x39,
  55. IT_COPY_DW = 0x3B,
  56. IT_WAIT_REG_MEM = 0x3C,
  57. IT_INDIRECT_BUFFER = 0x3F,
  58. IT_COPY_DATA = 0x40,
  59. IT_PFP_SYNC_ME = 0x42,
  60. IT_SURFACE_SYNC = 0x43,
  61. IT_COND_WRITE = 0x45,
  62. IT_EVENT_WRITE = 0x46,
  63. IT_EVENT_WRITE_EOP = 0x47,
  64. IT_EVENT_WRITE_EOS = 0x48,
  65. IT_RELEASE_MEM = 0x49,
  66. IT_PREAMBLE_CNTL = 0x4A,
  67. IT_DMA_DATA = 0x50,
  68. IT_ACQUIRE_MEM = 0x58,
  69. IT_REWIND = 0x59,
  70. IT_LOAD_UCONFIG_REG = 0x5E,
  71. IT_LOAD_SH_REG = 0x5F,
  72. IT_LOAD_CONFIG_REG = 0x60,
  73. IT_LOAD_CONTEXT_REG = 0x61,
  74. IT_SET_CONFIG_REG = 0x68,
  75. IT_SET_CONTEXT_REG = 0x69,
  76. IT_SET_CONTEXT_REG_INDIRECT = 0x73,
  77. IT_SET_SH_REG = 0x76,
  78. IT_SET_SH_REG_OFFSET = 0x77,
  79. IT_SET_QUEUE_REG = 0x78,
  80. IT_SET_UCONFIG_REG = 0x79,
  81. IT_SCRATCH_RAM_WRITE = 0x7D,
  82. IT_SCRATCH_RAM_READ = 0x7E,
  83. IT_LOAD_CONST_RAM = 0x80,
  84. IT_WRITE_CONST_RAM = 0x81,
  85. IT_DUMP_CONST_RAM = 0x83,
  86. IT_INCREMENT_CE_COUNTER = 0x84,
  87. IT_INCREMENT_DE_COUNTER = 0x85,
  88. IT_WAIT_ON_CE_COUNTER = 0x86,
  89. IT_WAIT_ON_DE_COUNTER_DIFF = 0x88,
  90. IT_SWITCH_BUFFER = 0x8B,
  91. IT_SET_RESOURCES = 0xA0,
  92. IT_MAP_PROCESS = 0xA1,
  93. IT_MAP_QUEUES = 0xA2,
  94. IT_UNMAP_QUEUES = 0xA3,
  95. IT_QUERY_STATUS = 0xA4,
  96. IT_RUN_LIST = 0xA5,
  97. };
  98. #define PM4_TYPE_0 0
  99. #define PM4_TYPE_2 2
  100. #define PM4_TYPE_3 3
  101. #endif /* KFD_PM4_OPCODES_H */