reo_flush_queue.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. /*
  2. * Copyright (c) 2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef _REO_FLUSH_QUEUE_H_
  19. #define _REO_FLUSH_QUEUE_H_
  20. #if !defined(__ASSEMBLER__)
  21. #endif
  22. #include "uniform_reo_cmd_header.h"
  23. // ################ START SUMMARY #################
  24. //
  25. // Dword Fields
  26. // 0 struct uniform_reo_cmd_header cmd_header;
  27. // 1 flush_desc_addr_31_0[31:0]
  28. // 2 flush_desc_addr_39_32[7:0], block_desc_addr_usage_after_flush[8], block_resource_index[10:9], reserved_2a[31:11]
  29. // 3 reserved_3a[31:0]
  30. // 4 reserved_4a[31:0]
  31. // 5 reserved_5a[31:0]
  32. // 6 reserved_6a[31:0]
  33. // 7 reserved_7a[31:0]
  34. // 8 reserved_8a[31:0]
  35. //
  36. // ################ END SUMMARY #################
  37. #define NUM_OF_DWORDS_REO_FLUSH_QUEUE 9
  38. struct reo_flush_queue {
  39. struct uniform_reo_cmd_header cmd_header;
  40. uint32_t flush_desc_addr_31_0 : 32; //[31:0]
  41. uint32_t flush_desc_addr_39_32 : 8, //[7:0]
  42. block_desc_addr_usage_after_flush: 1, //[8]
  43. block_resource_index : 2, //[10:9]
  44. reserved_2a : 21; //[31:11]
  45. uint32_t reserved_3a : 32; //[31:0]
  46. uint32_t reserved_4a : 32; //[31:0]
  47. uint32_t reserved_5a : 32; //[31:0]
  48. uint32_t reserved_6a : 32; //[31:0]
  49. uint32_t reserved_7a : 32; //[31:0]
  50. uint32_t reserved_8a : 32; //[31:0]
  51. };
  52. /*
  53. struct uniform_reo_cmd_header cmd_header
  54. Consumer: REO
  55. Producer: SW
  56. Details for command execution tracking purposes.
  57. flush_desc_addr_31_0
  58. Consumer: REO
  59. Producer: SW
  60. Address (lower 32 bits) of the descriptor to flush
  61. <legal all>
  62. flush_desc_addr_39_32
  63. Consumer: REO
  64. Producer: SW
  65. Address (upper 8 bits) of the descriptor to flush
  66. <legal all>
  67. block_desc_addr_usage_after_flush
  68. When set, REO shall not re-fetch this address till SW
  69. explicitly unblocked this address
  70. If the blocking resource was already used, this command
  71. shall fail and an error is reported
  72. <legal all>
  73. block_resource_index
  74. Field only valid when 'Block_desc_addr_usage_after_flush
  75. ' is set.
  76. Indicates which of the four blocking resources in REO
  77. will be assigned for managing the blocking of this address.
  78. <legal all>
  79. reserved_2a
  80. <legal 0>
  81. reserved_3a
  82. <legal 0>
  83. reserved_4a
  84. <legal 0>
  85. reserved_5a
  86. <legal 0>
  87. reserved_6a
  88. <legal 0>
  89. reserved_7a
  90. <legal 0>
  91. reserved_8a
  92. <legal 0>
  93. */
  94. #define REO_FLUSH_QUEUE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_OFFSET 0x00000000
  95. #define REO_FLUSH_QUEUE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_LSB 0
  96. #define REO_FLUSH_QUEUE_0_UNIFORM_REO_CMD_HEADER_CMD_HEADER_MASK 0xffffffff
  97. /* Description REO_FLUSH_QUEUE_1_FLUSH_DESC_ADDR_31_0
  98. Consumer: REO
  99. Producer: SW
  100. Address (lower 32 bits) of the descriptor to flush
  101. <legal all>
  102. */
  103. #define REO_FLUSH_QUEUE_1_FLUSH_DESC_ADDR_31_0_OFFSET 0x00000004
  104. #define REO_FLUSH_QUEUE_1_FLUSH_DESC_ADDR_31_0_LSB 0
  105. #define REO_FLUSH_QUEUE_1_FLUSH_DESC_ADDR_31_0_MASK 0xffffffff
  106. /* Description REO_FLUSH_QUEUE_2_FLUSH_DESC_ADDR_39_32
  107. Consumer: REO
  108. Producer: SW
  109. Address (upper 8 bits) of the descriptor to flush
  110. <legal all>
  111. */
  112. #define REO_FLUSH_QUEUE_2_FLUSH_DESC_ADDR_39_32_OFFSET 0x00000008
  113. #define REO_FLUSH_QUEUE_2_FLUSH_DESC_ADDR_39_32_LSB 0
  114. #define REO_FLUSH_QUEUE_2_FLUSH_DESC_ADDR_39_32_MASK 0x000000ff
  115. /* Description REO_FLUSH_QUEUE_2_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH
  116. When set, REO shall not re-fetch this address till SW
  117. explicitly unblocked this address
  118. If the blocking resource was already used, this command
  119. shall fail and an error is reported
  120. <legal all>
  121. */
  122. #define REO_FLUSH_QUEUE_2_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_OFFSET 0x00000008
  123. #define REO_FLUSH_QUEUE_2_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_LSB 8
  124. #define REO_FLUSH_QUEUE_2_BLOCK_DESC_ADDR_USAGE_AFTER_FLUSH_MASK 0x00000100
  125. /* Description REO_FLUSH_QUEUE_2_BLOCK_RESOURCE_INDEX
  126. Field only valid when 'Block_desc_addr_usage_after_flush
  127. ' is set.
  128. Indicates which of the four blocking resources in REO
  129. will be assigned for managing the blocking of this address.
  130. <legal all>
  131. */
  132. #define REO_FLUSH_QUEUE_2_BLOCK_RESOURCE_INDEX_OFFSET 0x00000008
  133. #define REO_FLUSH_QUEUE_2_BLOCK_RESOURCE_INDEX_LSB 9
  134. #define REO_FLUSH_QUEUE_2_BLOCK_RESOURCE_INDEX_MASK 0x00000600
  135. /* Description REO_FLUSH_QUEUE_2_RESERVED_2A
  136. <legal 0>
  137. */
  138. #define REO_FLUSH_QUEUE_2_RESERVED_2A_OFFSET 0x00000008
  139. #define REO_FLUSH_QUEUE_2_RESERVED_2A_LSB 11
  140. #define REO_FLUSH_QUEUE_2_RESERVED_2A_MASK 0xfffff800
  141. /* Description REO_FLUSH_QUEUE_3_RESERVED_3A
  142. <legal 0>
  143. */
  144. #define REO_FLUSH_QUEUE_3_RESERVED_3A_OFFSET 0x0000000c
  145. #define REO_FLUSH_QUEUE_3_RESERVED_3A_LSB 0
  146. #define REO_FLUSH_QUEUE_3_RESERVED_3A_MASK 0xffffffff
  147. /* Description REO_FLUSH_QUEUE_4_RESERVED_4A
  148. <legal 0>
  149. */
  150. #define REO_FLUSH_QUEUE_4_RESERVED_4A_OFFSET 0x00000010
  151. #define REO_FLUSH_QUEUE_4_RESERVED_4A_LSB 0
  152. #define REO_FLUSH_QUEUE_4_RESERVED_4A_MASK 0xffffffff
  153. /* Description REO_FLUSH_QUEUE_5_RESERVED_5A
  154. <legal 0>
  155. */
  156. #define REO_FLUSH_QUEUE_5_RESERVED_5A_OFFSET 0x00000014
  157. #define REO_FLUSH_QUEUE_5_RESERVED_5A_LSB 0
  158. #define REO_FLUSH_QUEUE_5_RESERVED_5A_MASK 0xffffffff
  159. /* Description REO_FLUSH_QUEUE_6_RESERVED_6A
  160. <legal 0>
  161. */
  162. #define REO_FLUSH_QUEUE_6_RESERVED_6A_OFFSET 0x00000018
  163. #define REO_FLUSH_QUEUE_6_RESERVED_6A_LSB 0
  164. #define REO_FLUSH_QUEUE_6_RESERVED_6A_MASK 0xffffffff
  165. /* Description REO_FLUSH_QUEUE_7_RESERVED_7A
  166. <legal 0>
  167. */
  168. #define REO_FLUSH_QUEUE_7_RESERVED_7A_OFFSET 0x0000001c
  169. #define REO_FLUSH_QUEUE_7_RESERVED_7A_LSB 0
  170. #define REO_FLUSH_QUEUE_7_RESERVED_7A_MASK 0xffffffff
  171. /* Description REO_FLUSH_QUEUE_8_RESERVED_8A
  172. <legal 0>
  173. */
  174. #define REO_FLUSH_QUEUE_8_RESERVED_8A_OFFSET 0x00000020
  175. #define REO_FLUSH_QUEUE_8_RESERVED_8A_LSB 0
  176. #define REO_FLUSH_QUEUE_8_RESERVED_8A_MASK 0xffffffff
  177. #endif // _REO_FLUSH_QUEUE_H_