adreno_gen8_snapshot.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
  4. * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  5. */
  6. #ifndef __ADRENO_GEN8_SNAPSHOT_H
  7. #define __ADRENO_GEN8_SNAPSHOT_H
  8. #include "adreno.h"
  9. #include "adreno_gen8.h"
  10. #include "kgsl_regmap.h"
  11. #include "kgsl_snapshot.h"
  12. enum cluster_id {
  13. CLUSTER_NONE = 0,
  14. CLUSTER_FE_US = 1,
  15. CLUSTER_FE_S = 2,
  16. CLUSTER_SP_VS = 3,
  17. CLUSTER_VPC_VS = 4,
  18. CLUSTER_VPC_US = 5,
  19. CLUSTER_GRAS = 6,
  20. CLUSTER_SP_PS = 7,
  21. CLUSTER_VPC_PS = 8,
  22. CLUSTER_PS = 9,
  23. };
  24. enum location_id {
  25. HLSQ_STATE = 0,
  26. HLSQ_DP = 1,
  27. SP_TOP = 2,
  28. USPTP = 3,
  29. HLSQ_DP_STR = 4,
  30. };
  31. #define STATE_NON_CONTEXT 0
  32. #define STATE_TOGGLE_CTXT 1
  33. #define STATE_FORCE_CTXT_0 2
  34. #define STATE_FORCE_CTXT_1 3
  35. #define UNSLICE 0
  36. #define SLICE 1
  37. #define MAX_PHYSICAL_SLICES 1
  38. #define NUMBER_OF_SLICES(region) ((region == SLICE) ? MAX_PHYSICAL_SLICES : 1)
  39. #define SLICE_ID(region, j) ((region == SLICE) ? j : UINT_MAX)
  40. #define GEN8_DEBUGBUS_BLOCK_SIZE 0x100
  41. /* Number of dword to dump in snapshot for CP SQE */
  42. #define GEN8_SQE_FW_SNAPSHOT_DWORDS 5
  43. struct sel_reg {
  44. u32 host_reg;
  45. u32 cd_reg;
  46. u32 val;
  47. };
  48. struct gen8_shader_block_info {
  49. struct gen8_shader_block *block;
  50. u32 sp_id;
  51. u32 usptp;
  52. u32 slice_id;
  53. u32 location_id;
  54. u32 context_id;
  55. u32 bank;
  56. u64 offset;
  57. };
  58. struct gen8_shader_block {
  59. /* statetype: Type identifier for the block */
  60. u32 statetype;
  61. /* size: Size of the block (in dwords) */
  62. u32 size;
  63. /* num_sps: The number of SPs to dump */
  64. u32 num_sps;
  65. /* num_usptps: The number of USPTPs to dump */
  66. u32 num_usptps;
  67. /* pipeid: Pipe identifier for the block data */
  68. u32 pipeid;
  69. /* location: Location identifier for the block data */
  70. u32 location;
  71. /* num_slices: the number of slices to dump */
  72. u32 num_slices;
  73. /* num_ctx: repeat id to loop */
  74. u32 num_ctx;
  75. /* offset: The offset in the snasphot dump */
  76. u64 offset;
  77. };
  78. struct gen8_cluster_registers_info {
  79. struct gen8_cluster_registers *cluster;
  80. u32 cluster_id;
  81. u32 slice_id;
  82. u32 pipe_id;
  83. u32 context_id;
  84. u64 offset;
  85. };
  86. struct gen8_cluster_registers {
  87. /* cluster_id: Cluster identifier */
  88. u32 cluster_id;
  89. /* slice_region: is it slice or unslice */
  90. u32 slice_region;
  91. /* pipe_id: Pipe Identifier */
  92. u32 pipe_id;
  93. /* context_id: one of STATE_ that identifies the context to dump */
  94. u32 context_id;
  95. /* regs: Pointer to an array of register pairs */
  96. const u32 *regs;
  97. /* sel: Pointer to a selector register to write before reading */
  98. const struct sel_reg *sel;
  99. /* offset: Internal variable to track the state of the crashdump */
  100. u32 offset;
  101. };
  102. struct gen8_reg_list_info {
  103. struct gen8_reg_list *regs;
  104. u32 cluster_id;
  105. u32 slice_id;
  106. u32 pipe_id;
  107. u32 sp_id;
  108. u32 usptp_id;
  109. u32 context_id;
  110. u64 offset;
  111. };
  112. struct gen8_sptp_cluster_registers_info {
  113. struct gen8_sptp_cluster_registers *cluster;
  114. u32 cluster_id;
  115. u32 slice_id;
  116. u32 pipe_id;
  117. u32 sp_id;
  118. u32 usptp_id;
  119. u32 location_id;
  120. u32 context_id;
  121. u32 statetype_id;
  122. u64 offset;
  123. };
  124. struct gen8_sptp_cluster_registers {
  125. /* cluster_id: Cluster identifier */
  126. u32 cluster_id;
  127. /* slice_region: is it slice or unslice */
  128. u32 slice_region;
  129. /* num_sps: The number of SPs to dump */
  130. u32 num_sps;
  131. /* num_usptps: The number of USPs to dump */
  132. u32 num_usptps;
  133. /* statetype: SP block state type for the cluster */
  134. u32 statetype;
  135. /* pipe_id: Pipe identifier */
  136. u32 pipe_id;
  137. /* context_id: Context identifier */
  138. u32 context_id;
  139. /* location_id: Location identifier */
  140. u32 location_id;
  141. /* regs: Pointer to the list of register pairs to read */
  142. const u32 *regs;
  143. /* regbase: Dword offset of the register block in the GPu register space */
  144. u32 regbase;
  145. /* offset: Internal variable used to track the crashdump state */
  146. u32 offset;
  147. };
  148. struct gen8_cp_indexed_reg {
  149. u32 addr;
  150. u32 data;
  151. u32 slice_region;
  152. u32 pipe_id;
  153. u32 size;
  154. };
  155. struct gen8_reg_list {
  156. u32 slice_region;
  157. const u32 *regs;
  158. const struct sel_reg *sel;
  159. u64 offset;
  160. };
  161. struct gen8_trace_buffer_info {
  162. u16 dbgc_ctrl;
  163. u16 segment;
  164. u16 granularity;
  165. u16 ping_blk[TRACE_BUF_NUM_SIG];
  166. u16 ping_idx[TRACE_BUF_NUM_SIG];
  167. };
  168. enum gen8_debugbus_ids {
  169. DEBUGBUS_GBIF_CX_GC_US_I_0 = 1,
  170. DEBUGBUS_GMU_CX_GC_US_I_0 = 2,
  171. DEBUGBUS_CX_GC_US_I_0 = 3,
  172. DEBUGBUS_GBIF_GX_GC_US_I_0 = 8,
  173. DEBUGBUS_GMU_GX_GC_US_I_0 = 9,
  174. DEBUGBUS_DBGC_GC_US_I_0 = 10,
  175. DEBUGBUS_RBBM_GC_US_I_0 = 11,
  176. DEBUGBUS_LARC_GC_US_I_0 = 12,
  177. DEBUGBUS_COM_GC_US_I_0 = 13,
  178. DEBUGBUS_HLSQ_GC_US_I_0 = 14,
  179. DEBUGBUS_CGC_GC_US_I_0 = 15,
  180. DEBUGBUS_VSC_GC_US_I_0_0 = 20,
  181. DEBUGBUS_VSC_GC_US_I_0_1 = 21,
  182. DEBUGBUS_UFC_GC_US_I_0 = 24,
  183. DEBUGBUS_UFC_GC_US_I_1 = 25,
  184. DEBUGBUS_CP_GC_US_I_0_0 = 40,
  185. DEBUGBUS_CP_GC_US_I_0_1 = 41,
  186. DEBUGBUS_CP_GC_US_I_0_2 = 42,
  187. DEBUGBUS_PC_BR_US_I_0 = 56,
  188. DEBUGBUS_PC_BV_US_I_0 = 57,
  189. DEBUGBUS_GPC_BR_US_I_0 = 58,
  190. DEBUGBUS_GPC_BV_US_I_0 = 59,
  191. DEBUGBUS_VPC_BR_US_I_0 = 60,
  192. DEBUGBUS_VPC_BV_US_I_0 = 61,
  193. DEBUGBUS_UCHE_WRAPPER_GC_US_I_0 = 80,
  194. DEBUGBUS_UCHE_GC_US_I_0 = 81,
  195. DEBUGBUS_UCHE_GC_US_I_1 = 82,
  196. DEBUGBUS_CP_GC_S_0_I_0 = 128,
  197. DEBUGBUS_PC_BR_S_0_I_0 = 129,
  198. DEBUGBUS_PC_BV_S_0_I_0 = 130,
  199. DEBUGBUS_TESS_GC_S_0_I_0 = 131,
  200. DEBUGBUS_TSEFE_GC_S_0_I_0 = 132,
  201. DEBUGBUS_TSEBE_GC_S_0_I_0 = 133,
  202. DEBUGBUS_RAS_GC_S_0_I_0 = 134,
  203. DEBUGBUS_LRZ_BR_S_0_I_0 = 135,
  204. DEBUGBUS_LRZ_BV_S_0_I_0 = 136,
  205. DEBUGBUS_VFDP_GC_S_0_I_0 = 137,
  206. DEBUGBUS_GPC_BR_S_0_I_0 = 138,
  207. DEBUGBUS_GPC_BV_S_0_I_0 = 139,
  208. DEBUGBUS_VPCFE_BR_S_0_I_0 = 140,
  209. DEBUGBUS_VPCFE_BV_S_0_I_0 = 141,
  210. DEBUGBUS_VPCBE_BR_S_0_I_0 = 142,
  211. DEBUGBUS_VPCBE_BV_S_0_I_0 = 143,
  212. DEBUGBUS_CCHE_GC_S_0_I_0 = 144,
  213. DEBUGBUS_DBGC_GC_S_0_I_0 = 145,
  214. DEBUGBUS_LARC_GC_S_0_I_0 = 146,
  215. DEBUGBUS_RBBM_GC_S_0_I_0 = 147,
  216. DEBUGBUS_CCRE_GC_S_0_I_0 = 148,
  217. DEBUGBUS_CGC_GC_S_0_I_0 = 149,
  218. DEBUGBUS_GMU_GC_S_0_I_0 = 150,
  219. DEBUGBUS_SLICE_GC_S_0_I_0 = 151,
  220. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_0_I_0 = 152,
  221. DEBUGBUS_USP_GC_S_0_I_0 = 160,
  222. DEBUGBUS_USP_GC_S_0_I_1 = 161,
  223. DEBUGBUS_USPTP_GC_S_0_I_0 = 166,
  224. DEBUGBUS_USPTP_GC_S_0_I_1 = 167,
  225. DEBUGBUS_USPTP_GC_S_0_I_2 = 168,
  226. DEBUGBUS_USPTP_GC_S_0_I_3 = 169,
  227. DEBUGBUS_TP_GC_S_0_I_0 = 178,
  228. DEBUGBUS_TP_GC_S_0_I_1 = 179,
  229. DEBUGBUS_TP_GC_S_0_I_2 = 180,
  230. DEBUGBUS_TP_GC_S_0_I_3 = 181,
  231. DEBUGBUS_RB_GC_S_0_I_0 = 190,
  232. DEBUGBUS_RB_GC_S_0_I_1 = 191,
  233. DEBUGBUS_CCU_GC_S_0_I_0 = 196,
  234. DEBUGBUS_CCU_GC_S_0_I_1 = 197,
  235. DEBUGBUS_HLSQ_GC_S_0_I_0 = 202,
  236. DEBUGBUS_HLSQ_GC_S_0_I_1 = 203,
  237. DEBUGBUS_VFD_GC_S_0_I_0 = 208,
  238. DEBUGBUS_VFD_GC_S_0_I_1 = 209,
  239. DEBUGBUS_CP_GC_S_1_I_0 = 256,
  240. DEBUGBUS_PC_BR_S_1_I_0 = 257,
  241. DEBUGBUS_PC_BV_S_1_I_0 = 258,
  242. DEBUGBUS_TESS_GC_S_1_I_0 = 259,
  243. DEBUGBUS_TSEFE_GC_S_1_I_0 = 260,
  244. DEBUGBUS_TSEBE_GC_S_1_I_0 = 261,
  245. DEBUGBUS_RAS_GC_S_1_I_0 = 262,
  246. DEBUGBUS_LRZ_BR_S_1_I_0 = 263,
  247. DEBUGBUS_LRZ_BV_S_1_I_0 = 264,
  248. DEBUGBUS_VFDP_GC_S_1_I_0 = 265,
  249. DEBUGBUS_GPC_BR_S_1_I_0 = 266,
  250. DEBUGBUS_GPC_BV_S_1_I_0 = 267,
  251. DEBUGBUS_VPCFE_BR_S_1_I_0 = 268,
  252. DEBUGBUS_VPCFE_BV_S_1_I_0 = 269,
  253. DEBUGBUS_VPCBE_BR_S_1_I_0 = 270,
  254. DEBUGBUS_VPCBE_BV_S_1_I_0 = 271,
  255. DEBUGBUS_CCHE_GC_S_1_I_0 = 272,
  256. DEBUGBUS_DBGC_GC_S_1_I_0 = 273,
  257. DEBUGBUS_LARC_GC_S_1_I_0 = 274,
  258. DEBUGBUS_RBBM_GC_S_1_I_0 = 275,
  259. DEBUGBUS_CCRE_GC_S_1_I_0 = 276,
  260. DEBUGBUS_CGC_GC_S_1_I_0 = 277,
  261. DEBUGBUS_GMU_GC_S_1_I_0 = 278,
  262. DEBUGBUS_SLICE_GC_S_1_I_0 = 279,
  263. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_1_I_0 = 280,
  264. DEBUGBUS_USP_GC_S_1_I_0 = 288,
  265. DEBUGBUS_USP_GC_S_1_I_1 = 289,
  266. DEBUGBUS_USPTP_GC_S_1_I_0 = 294,
  267. DEBUGBUS_USPTP_GC_S_1_I_1 = 295,
  268. DEBUGBUS_USPTP_GC_S_1_I_2 = 296,
  269. DEBUGBUS_USPTP_GC_S_1_I_3 = 297,
  270. DEBUGBUS_TP_GC_S_1_I_0 = 306,
  271. DEBUGBUS_TP_GC_S_1_I_1 = 307,
  272. DEBUGBUS_TP_GC_S_1_I_2 = 308,
  273. DEBUGBUS_TP_GC_S_1_I_3 = 309,
  274. DEBUGBUS_RB_GC_S_1_I_0 = 318,
  275. DEBUGBUS_RB_GC_S_1_I_1 = 319,
  276. DEBUGBUS_CCU_GC_S_1_I_0 = 324,
  277. DEBUGBUS_CCU_GC_S_1_I_1 = 325,
  278. DEBUGBUS_HLSQ_GC_S_1_I_0 = 330,
  279. DEBUGBUS_HLSQ_GC_S_1_I_1 = 331,
  280. DEBUGBUS_VFD_GC_S_1_I_0 = 336,
  281. DEBUGBUS_VFD_GC_S_1_I_1 = 337,
  282. DEBUGBUS_CP_GC_S_2_I_0 = 384,
  283. DEBUGBUS_PC_BR_S_2_I_0 = 385,
  284. DEBUGBUS_PC_BV_S_2_I_0 = 386,
  285. DEBUGBUS_TESS_GC_S_2_I_0 = 387,
  286. DEBUGBUS_TSEFE_GC_S_2_I_0 = 388,
  287. DEBUGBUS_TSEBE_GC_S_2_I_0 = 389,
  288. DEBUGBUS_RAS_GC_S_2_I_0 = 390,
  289. DEBUGBUS_LRZ_BR_S_2_I_0 = 391,
  290. DEBUGBUS_LRZ_BV_S_2_I_0 = 392,
  291. DEBUGBUS_VFDP_GC_S_2_I_0 = 393,
  292. DEBUGBUS_GPC_BR_S_2_I_0 = 394,
  293. DEBUGBUS_GPC_BV_S_2_I_0 = 395,
  294. DEBUGBUS_VPCFE_BR_S_2_I_0 = 396,
  295. DEBUGBUS_VPCFE_BV_S_2_I_0 = 397,
  296. DEBUGBUS_VPCBE_BR_S_2_I_0 = 398,
  297. DEBUGBUS_VPCBE_BV_S_2_I_0 = 399,
  298. DEBUGBUS_CCHE_GC_S_2_I_0 = 400,
  299. DEBUGBUS_DBGC_GC_S_2_I_0 = 401,
  300. DEBUGBUS_LARC_GC_S_2_I_0 = 402,
  301. DEBUGBUS_RBBM_GC_S_2_I_0 = 403,
  302. DEBUGBUS_CCRE_GC_S_2_I_0 = 404,
  303. DEBUGBUS_CGC_GC_S_2_I_0 = 405,
  304. DEBUGBUS_GMU_GC_S_2_I_0 = 406,
  305. DEBUGBUS_SLICE_GC_S_2_I_0 = 407,
  306. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_2_I_0 = 408,
  307. DEBUGBUS_USP_GC_S_2_I_0 = 416,
  308. DEBUGBUS_USP_GC_S_2_I_1 = 417,
  309. DEBUGBUS_USPTP_GC_S_2_I_0 = 422,
  310. DEBUGBUS_USPTP_GC_S_2_I_1 = 423,
  311. DEBUGBUS_USPTP_GC_S_2_I_2 = 424,
  312. DEBUGBUS_USPTP_GC_S_2_I_3 = 425,
  313. DEBUGBUS_TP_GC_S_2_I_0 = 434,
  314. DEBUGBUS_TP_GC_S_2_I_1 = 435,
  315. DEBUGBUS_TP_GC_S_2_I_2 = 436,
  316. DEBUGBUS_TP_GC_S_2_I_3 = 437,
  317. DEBUGBUS_RB_GC_S_2_I_0 = 446,
  318. DEBUGBUS_RB_GC_S_2_I_1 = 447,
  319. DEBUGBUS_CCU_GC_S_2_I_0 = 452,
  320. DEBUGBUS_CCU_GC_S_2_I_1 = 453,
  321. DEBUGBUS_HLSQ_GC_S_2_I_0 = 458,
  322. DEBUGBUS_HLSQ_GC_S_2_I_1 = 459,
  323. DEBUGBUS_VFD_GC_S_2_I_0 = 464,
  324. DEBUGBUS_VFD_GC_S_2_I_1 = 465,
  325. };
  326. static const u32 gen8_debugbus_blocks[] = {
  327. DEBUGBUS_GMU_GX_GC_US_I_0,
  328. DEBUGBUS_DBGC_GC_US_I_0,
  329. DEBUGBUS_RBBM_GC_US_I_0,
  330. DEBUGBUS_LARC_GC_US_I_0,
  331. DEBUGBUS_COM_GC_US_I_0,
  332. DEBUGBUS_HLSQ_GC_US_I_0,
  333. DEBUGBUS_CGC_GC_US_I_0,
  334. DEBUGBUS_VSC_GC_US_I_0_0,
  335. DEBUGBUS_VSC_GC_US_I_0_1,
  336. DEBUGBUS_UFC_GC_US_I_0,
  337. DEBUGBUS_UFC_GC_US_I_1,
  338. DEBUGBUS_CP_GC_US_I_0_0,
  339. DEBUGBUS_CP_GC_US_I_0_1,
  340. DEBUGBUS_CP_GC_US_I_0_2,
  341. DEBUGBUS_PC_BR_US_I_0,
  342. DEBUGBUS_PC_BV_US_I_0,
  343. DEBUGBUS_GPC_BR_US_I_0,
  344. DEBUGBUS_GPC_BV_US_I_0,
  345. DEBUGBUS_VPC_BR_US_I_0,
  346. DEBUGBUS_VPC_BV_US_I_0,
  347. DEBUGBUS_UCHE_WRAPPER_GC_US_I_0,
  348. DEBUGBUS_UCHE_GC_US_I_0,
  349. DEBUGBUS_UCHE_GC_US_I_1,
  350. DEBUGBUS_CP_GC_S_0_I_0,
  351. DEBUGBUS_PC_BR_S_0_I_0,
  352. DEBUGBUS_PC_BV_S_0_I_0,
  353. DEBUGBUS_TESS_GC_S_0_I_0,
  354. DEBUGBUS_TSEFE_GC_S_0_I_0,
  355. DEBUGBUS_TSEBE_GC_S_0_I_0,
  356. DEBUGBUS_RAS_GC_S_0_I_0,
  357. DEBUGBUS_LRZ_BR_S_0_I_0,
  358. DEBUGBUS_LRZ_BV_S_0_I_0,
  359. DEBUGBUS_VFDP_GC_S_0_I_0,
  360. DEBUGBUS_GPC_BR_S_0_I_0,
  361. DEBUGBUS_GPC_BV_S_0_I_0,
  362. DEBUGBUS_VPCFE_BR_S_0_I_0,
  363. DEBUGBUS_VPCFE_BV_S_0_I_0,
  364. DEBUGBUS_VPCBE_BR_S_0_I_0,
  365. DEBUGBUS_VPCBE_BV_S_0_I_0,
  366. DEBUGBUS_CCHE_GC_S_0_I_0,
  367. DEBUGBUS_DBGC_GC_S_0_I_0,
  368. DEBUGBUS_LARC_GC_S_0_I_0,
  369. DEBUGBUS_RBBM_GC_S_0_I_0,
  370. DEBUGBUS_CCRE_GC_S_0_I_0,
  371. DEBUGBUS_CGC_GC_S_0_I_0,
  372. DEBUGBUS_GMU_GC_S_0_I_0,
  373. DEBUGBUS_SLICE_GC_S_0_I_0,
  374. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_0_I_0,
  375. DEBUGBUS_USP_GC_S_0_I_0,
  376. DEBUGBUS_USP_GC_S_0_I_1,
  377. DEBUGBUS_USPTP_GC_S_0_I_0,
  378. DEBUGBUS_USPTP_GC_S_0_I_1,
  379. DEBUGBUS_USPTP_GC_S_0_I_2,
  380. DEBUGBUS_USPTP_GC_S_0_I_3,
  381. DEBUGBUS_TP_GC_S_0_I_0,
  382. DEBUGBUS_TP_GC_S_0_I_1,
  383. DEBUGBUS_TP_GC_S_0_I_2,
  384. DEBUGBUS_TP_GC_S_0_I_3,
  385. DEBUGBUS_RB_GC_S_0_I_0,
  386. DEBUGBUS_RB_GC_S_0_I_1,
  387. DEBUGBUS_CCU_GC_S_0_I_0,
  388. DEBUGBUS_CCU_GC_S_0_I_1,
  389. DEBUGBUS_HLSQ_GC_S_0_I_0,
  390. DEBUGBUS_HLSQ_GC_S_0_I_1,
  391. DEBUGBUS_VFD_GC_S_0_I_0,
  392. DEBUGBUS_VFD_GC_S_0_I_1,
  393. DEBUGBUS_CP_GC_S_1_I_0,
  394. DEBUGBUS_PC_BR_S_1_I_0,
  395. DEBUGBUS_PC_BV_S_1_I_0,
  396. DEBUGBUS_TESS_GC_S_1_I_0,
  397. DEBUGBUS_TSEFE_GC_S_1_I_0,
  398. DEBUGBUS_TSEBE_GC_S_1_I_0,
  399. DEBUGBUS_RAS_GC_S_1_I_0,
  400. DEBUGBUS_LRZ_BR_S_1_I_0,
  401. DEBUGBUS_LRZ_BV_S_1_I_0,
  402. DEBUGBUS_VFDP_GC_S_1_I_0,
  403. DEBUGBUS_GPC_BR_S_1_I_0,
  404. DEBUGBUS_GPC_BV_S_1_I_0,
  405. DEBUGBUS_VPCFE_BR_S_1_I_0,
  406. DEBUGBUS_VPCFE_BV_S_1_I_0,
  407. DEBUGBUS_VPCBE_BR_S_1_I_0,
  408. DEBUGBUS_VPCBE_BV_S_1_I_0,
  409. DEBUGBUS_CCHE_GC_S_1_I_0,
  410. DEBUGBUS_DBGC_GC_S_1_I_0,
  411. DEBUGBUS_LARC_GC_S_1_I_0,
  412. DEBUGBUS_RBBM_GC_S_1_I_0,
  413. DEBUGBUS_CCRE_GC_S_1_I_0,
  414. DEBUGBUS_CGC_GC_S_1_I_0,
  415. DEBUGBUS_GMU_GC_S_1_I_0,
  416. DEBUGBUS_SLICE_GC_S_1_I_0,
  417. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_1_I_0,
  418. DEBUGBUS_USP_GC_S_1_I_0,
  419. DEBUGBUS_USP_GC_S_1_I_1,
  420. DEBUGBUS_USPTP_GC_S_1_I_0,
  421. DEBUGBUS_USPTP_GC_S_1_I_1,
  422. DEBUGBUS_USPTP_GC_S_1_I_2,
  423. DEBUGBUS_USPTP_GC_S_1_I_3,
  424. DEBUGBUS_TP_GC_S_1_I_0,
  425. DEBUGBUS_TP_GC_S_1_I_1,
  426. DEBUGBUS_TP_GC_S_1_I_2,
  427. DEBUGBUS_TP_GC_S_1_I_3,
  428. DEBUGBUS_RB_GC_S_1_I_0,
  429. DEBUGBUS_RB_GC_S_1_I_1,
  430. DEBUGBUS_CCU_GC_S_1_I_0,
  431. DEBUGBUS_CCU_GC_S_1_I_1,
  432. DEBUGBUS_HLSQ_GC_S_1_I_0,
  433. DEBUGBUS_HLSQ_GC_S_1_I_1,
  434. DEBUGBUS_VFD_GC_S_1_I_0,
  435. DEBUGBUS_VFD_GC_S_1_I_1,
  436. DEBUGBUS_CP_GC_S_2_I_0,
  437. DEBUGBUS_PC_BR_S_2_I_0,
  438. DEBUGBUS_PC_BV_S_2_I_0,
  439. DEBUGBUS_TESS_GC_S_2_I_0,
  440. DEBUGBUS_TSEFE_GC_S_2_I_0,
  441. DEBUGBUS_TSEBE_GC_S_2_I_0,
  442. DEBUGBUS_RAS_GC_S_2_I_0,
  443. DEBUGBUS_LRZ_BR_S_2_I_0,
  444. DEBUGBUS_LRZ_BV_S_2_I_0,
  445. DEBUGBUS_VFDP_GC_S_2_I_0,
  446. DEBUGBUS_GPC_BR_S_2_I_0,
  447. DEBUGBUS_GPC_BV_S_2_I_0,
  448. DEBUGBUS_VPCFE_BR_S_2_I_0,
  449. DEBUGBUS_VPCFE_BV_S_2_I_0,
  450. DEBUGBUS_VPCBE_BR_S_2_I_0,
  451. DEBUGBUS_VPCBE_BV_S_2_I_0,
  452. DEBUGBUS_CCHE_GC_S_2_I_0,
  453. DEBUGBUS_DBGC_GC_S_2_I_0,
  454. DEBUGBUS_LARC_GC_S_2_I_0,
  455. DEBUGBUS_RBBM_GC_S_2_I_0,
  456. DEBUGBUS_CCRE_GC_S_2_I_0,
  457. DEBUGBUS_CGC_GC_S_2_I_0,
  458. DEBUGBUS_GMU_GC_S_2_I_0,
  459. DEBUGBUS_SLICE_GC_S_2_I_0,
  460. DEBUGBUS_HLSQ_SPTP_STAR_GC_S_2_I_0,
  461. DEBUGBUS_USP_GC_S_2_I_0,
  462. DEBUGBUS_USP_GC_S_2_I_1,
  463. DEBUGBUS_USPTP_GC_S_2_I_0,
  464. DEBUGBUS_USPTP_GC_S_2_I_1,
  465. DEBUGBUS_USPTP_GC_S_2_I_2,
  466. DEBUGBUS_USPTP_GC_S_2_I_3,
  467. DEBUGBUS_TP_GC_S_2_I_0,
  468. DEBUGBUS_TP_GC_S_2_I_1,
  469. DEBUGBUS_TP_GC_S_2_I_2,
  470. DEBUGBUS_TP_GC_S_2_I_3,
  471. DEBUGBUS_RB_GC_S_2_I_0,
  472. DEBUGBUS_RB_GC_S_2_I_1,
  473. DEBUGBUS_CCU_GC_S_2_I_0,
  474. DEBUGBUS_CCU_GC_S_2_I_1,
  475. DEBUGBUS_HLSQ_GC_S_2_I_0,
  476. DEBUGBUS_HLSQ_GC_S_2_I_1,
  477. DEBUGBUS_VFD_GC_S_2_I_0,
  478. DEBUGBUS_VFD_GC_S_2_I_1,
  479. };
  480. static const u32 gen8_gbif_debugbus_blocks[] = {
  481. DEBUGBUS_GBIF_GX_GC_US_I_0,
  482. };
  483. static const u32 gen8_cx_debugbus_blocks[] = {
  484. DEBUGBUS_GBIF_CX_GC_US_I_0,
  485. DEBUGBUS_GMU_CX_GC_US_I_0,
  486. DEBUGBUS_CX_GC_US_I_0,
  487. };
  488. enum gen8_statetype_ids {
  489. TP0_NCTX_REG = 0,
  490. TP0_CTX0_3D_CVS_REG = 1,
  491. TP0_CTX0_3D_CPS_REG = 2,
  492. TP0_CTX1_3D_CVS_REG = 3,
  493. TP0_CTX1_3D_CPS_REG = 4,
  494. TP0_CTX2_3D_CPS_REG = 5,
  495. TP0_CTX3_3D_CPS_REG = 6,
  496. TP0_TMO_DATA = 9,
  497. TP0_SMO_DATA = 10,
  498. TP0_MIPMAP_BASE_DATA = 11,
  499. SP_INST_DATA_3 = 31,
  500. SP_NCTX_REG = 32,
  501. SP_CTX0_3D_CVS_REG = 33,
  502. SP_CTX0_3D_CPS_REG = 34,
  503. SP_CTX1_3D_CVS_REG = 35,
  504. SP_CTX1_3D_CPS_REG = 36,
  505. SP_CTX2_3D_CPS_REG = 37,
  506. SP_CTX3_3D_CPS_REG = 38,
  507. SP_INST_DATA = 39,
  508. SP_INST_DATA_1 = 40,
  509. SP_LB_0_DATA = 41,
  510. SP_LB_1_DATA = 42,
  511. SP_LB_2_DATA = 43,
  512. SP_LB_3_DATA = 44,
  513. SP_LB_4_DATA = 45,
  514. SP_LB_5_DATA = 46,
  515. SP_LB_6_DATA = 47,
  516. SP_LB_7_DATA = 48,
  517. SP_CB_RAM = 49,
  518. SP_LB_13_DATA = 50,
  519. SP_LB_14_DATA = 51,
  520. SP_INST_TAG = 52,
  521. SP_INST_DATA_2 = 53,
  522. SP_TMO_TAG = 54,
  523. SP_SMO_TAG = 55,
  524. SP_STATE_DATA = 56,
  525. SP_HWAVE_RAM = 57,
  526. SP_L0_INST_BUF = 58,
  527. SP_LB_8_DATA = 59,
  528. SP_LB_9_DATA = 60,
  529. SP_LB_10_DATA = 61,
  530. SP_LB_11_DATA = 62,
  531. SP_LB_12_DATA = 63,
  532. HLSQ_DATAPATH_DSTR_META = 64,
  533. HLSQ_DESC_REMAP_META = 65,
  534. HLSQ_SLICE_TOP_META = 66,
  535. HLSQ_L2STC_TAG_RAM = 67,
  536. HLSQ_L2STC_INFO_CMD = 68,
  537. HLSQ_CVS_BE_CTXT_BUF_RAM_TAG = 69,
  538. HLSQ_CPS_BE_CTXT_BUF_RAM_TAG = 70,
  539. HLSQ_GFX_CVS_BE_CTXT_BUF_RAM = 71,
  540. HLSQ_GFX_CPS_BE_CTXT_BUF_RAM = 72,
  541. HLSQ_CHUNK_CVS_RAM = 73,
  542. HLSQ_CHUNK_CPS_RAM = 74,
  543. HLSQ_CHUNK_CVS_RAM_TAG = 75,
  544. HLSQ_CHUNK_CPS_RAM_TAG = 76,
  545. HLSQ_ICB_CVS_CB_BASE_TAG = 77,
  546. HLSQ_ICB_CPS_CB_BASE_TAG = 78,
  547. HLSQ_CVS_MISC_RAM = 79,
  548. HLSQ_CPS_MISC_RAM = 80,
  549. HLSQ_CPS_MISC_RAM_1 = 81,
  550. HLSQ_INST_RAM = 82,
  551. HLSQ_GFX_CVS_CONST_RAM = 83,
  552. HLSQ_GFX_CPS_CONST_RAM = 84,
  553. HLSQ_CVS_MISC_RAM_TAG = 85,
  554. HLSQ_CPS_MISC_RAM_TAG = 86,
  555. HLSQ_INST_RAM_TAG = 87,
  556. HLSQ_GFX_CVS_CONST_RAM_TAG = 88,
  557. HLSQ_GFX_CPS_CONST_RAM_TAG = 89,
  558. HLSQ_GFX_LOCAL_MISC_RAM = 90,
  559. HLSQ_GFX_LOCAL_MISC_RAM_TAG = 91,
  560. HLSQ_INST_RAM_1 = 92,
  561. HLSQ_STPROC_META = 93,
  562. HLSQ_SLICE_BACKEND_META = 94,
  563. HLSQ_INST_RAM_2 = 95,
  564. HLSQ_DATAPATH_META = 96,
  565. HLSQ_FRONTEND_META = 97,
  566. HLSQ_INDIRECT_META = 98,
  567. HLSQ_BACKEND_META = 99,
  568. };
  569. struct gen8_snapshot_block_list {
  570. /* pre_crashdumper_regs : Registers which need to be dumped before CD runs */
  571. struct gen8_reg_list *pre_crashdumper_regs;
  572. /* pre_crashdumper_regs_size : Size of registers which need to be dumped before CD runs */
  573. size_t num_pre_crashdumper_regs;
  574. /* debugbus_blocks : List of debugbus blocks */
  575. const u32 *debugbus_blocks;
  576. /* debugbus_blocks_len : Length of the debugbus list */
  577. size_t debugbus_blocks_len;
  578. /* gbif_debugbus_blocks : List of GBIF debugbus blocks */
  579. const u32 *gbif_debugbus_blocks;
  580. /* gbif_debugbus_blocks_len : Length of GBIF debugbus list */
  581. size_t gbif_debugbus_blocks_len;
  582. /* cx_debugbus_blocks : List of CX debugbus blocks */
  583. const u32 *cx_debugbus_blocks;
  584. /* cx_debugbus_blocks_len : Length of the CX debugbus list */
  585. size_t cx_debugbus_blocks_len;
  586. /* external_core_regs : List of external core registers */
  587. const u32 **external_core_regs;
  588. /* num_external_core_regs : length of external core registers list */
  589. size_t num_external_core_regs;
  590. /* gmu_cx_unsliced_regs : List of GMU CX unsliced registers */
  591. const u32 *gmu_cx_unsliced_regs;
  592. /* gmu_gx_registers : List of GMU registers */
  593. struct gen8_reg_list *gmu_gx_regs;
  594. /* num_gmu_gx_regs : Length of GMU registers list */
  595. size_t num_gmu_gx_regs;
  596. /* rscc_regs : List of RSCC registers */
  597. const u32 *rscc_regs;
  598. /* reg_list : List of GPU internal registers */
  599. struct gen8_reg_list *reg_list;
  600. /* reg_list : List of cx_misc registers */
  601. const u32 *cx_misc_regs;
  602. /* shader_blocks : List of GPU shader memory */
  603. struct gen8_shader_block *shader_blocks;
  604. /* num_shader_blocks : Length of the shader memory list */
  605. size_t num_shader_blocks;
  606. /* cp_cluster_registers : List of GPU CP cluster registers */
  607. struct gen8_cluster_registers *cp_clusters;
  608. /* num_cp_clusters : Length of GPU CP cluster registers list */
  609. size_t num_cp_clusters;
  610. /* cluster_registers : List of GPU cluster registers */
  611. struct gen8_cluster_registers *clusters;
  612. /* num_clusters : Length of GPU cluster registers list */
  613. size_t num_clusters;
  614. /* spstp_cluster_registers : List of GPU SPTP cluster registers */
  615. struct gen8_sptp_cluster_registers *sptp_clusters;
  616. /* num_sptp_clusters : Length of GPU SPTP cluster registers list */
  617. size_t num_sptp_clusters;
  618. /* post_crashdumper_regs : Registers which need to be dumped after CD runs */
  619. const u32 *post_crashdumper_regs;
  620. /* index_registers : List of index_registers */
  621. struct gen8_cp_indexed_reg *index_registers;
  622. /* index_registers_len : Length of the index registers */
  623. size_t index_registers_len;
  624. /* mempool_index_registers : List of CP mempool_index_registers */
  625. struct gen8_cp_indexed_reg *mempool_index_registers;
  626. /* mempool_index_registers_len : Length of the mempool index registers */
  627. size_t mempool_index_registers_len;
  628. };
  629. #endif /*__ADRENO_GEN8_SNAPSHOT_H */