vi_structs.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792
  1. /*
  2. * Copyright 2012 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 VI_STRUCTS_H_
  24. #define VI_STRUCTS_H_
  25. struct vi_sdma_mqd {
  26. uint32_t sdmax_rlcx_rb_cntl;
  27. uint32_t sdmax_rlcx_rb_base;
  28. uint32_t sdmax_rlcx_rb_base_hi;
  29. uint32_t sdmax_rlcx_rb_rptr;
  30. uint32_t sdmax_rlcx_rb_wptr;
  31. uint32_t sdmax_rlcx_rb_wptr_poll_cntl;
  32. uint32_t sdmax_rlcx_rb_wptr_poll_addr_hi;
  33. uint32_t sdmax_rlcx_rb_wptr_poll_addr_lo;
  34. uint32_t sdmax_rlcx_rb_rptr_addr_hi;
  35. uint32_t sdmax_rlcx_rb_rptr_addr_lo;
  36. uint32_t sdmax_rlcx_ib_cntl;
  37. uint32_t sdmax_rlcx_ib_rptr;
  38. uint32_t sdmax_rlcx_ib_offset;
  39. uint32_t sdmax_rlcx_ib_base_lo;
  40. uint32_t sdmax_rlcx_ib_base_hi;
  41. uint32_t sdmax_rlcx_ib_size;
  42. uint32_t sdmax_rlcx_skip_cntl;
  43. uint32_t sdmax_rlcx_context_status;
  44. uint32_t sdmax_rlcx_doorbell;
  45. uint32_t sdmax_rlcx_virtual_addr;
  46. uint32_t sdmax_rlcx_ape1_cntl;
  47. uint32_t sdmax_rlcx_doorbell_log;
  48. uint32_t reserved_22;
  49. uint32_t reserved_23;
  50. uint32_t reserved_24;
  51. uint32_t reserved_25;
  52. uint32_t reserved_26;
  53. uint32_t reserved_27;
  54. uint32_t reserved_28;
  55. uint32_t reserved_29;
  56. uint32_t reserved_30;
  57. uint32_t reserved_31;
  58. uint32_t reserved_32;
  59. uint32_t reserved_33;
  60. uint32_t reserved_34;
  61. uint32_t reserved_35;
  62. uint32_t reserved_36;
  63. uint32_t reserved_37;
  64. uint32_t reserved_38;
  65. uint32_t reserved_39;
  66. uint32_t reserved_40;
  67. uint32_t reserved_41;
  68. uint32_t reserved_42;
  69. uint32_t reserved_43;
  70. uint32_t reserved_44;
  71. uint32_t reserved_45;
  72. uint32_t reserved_46;
  73. uint32_t reserved_47;
  74. uint32_t reserved_48;
  75. uint32_t reserved_49;
  76. uint32_t reserved_50;
  77. uint32_t reserved_51;
  78. uint32_t reserved_52;
  79. uint32_t reserved_53;
  80. uint32_t reserved_54;
  81. uint32_t reserved_55;
  82. uint32_t reserved_56;
  83. uint32_t reserved_57;
  84. uint32_t reserved_58;
  85. uint32_t reserved_59;
  86. uint32_t reserved_60;
  87. uint32_t reserved_61;
  88. uint32_t reserved_62;
  89. uint32_t reserved_63;
  90. uint32_t reserved_64;
  91. uint32_t reserved_65;
  92. uint32_t reserved_66;
  93. uint32_t reserved_67;
  94. uint32_t reserved_68;
  95. uint32_t reserved_69;
  96. uint32_t reserved_70;
  97. uint32_t reserved_71;
  98. uint32_t reserved_72;
  99. uint32_t reserved_73;
  100. uint32_t reserved_74;
  101. uint32_t reserved_75;
  102. uint32_t reserved_76;
  103. uint32_t reserved_77;
  104. uint32_t reserved_78;
  105. uint32_t reserved_79;
  106. uint32_t reserved_80;
  107. uint32_t reserved_81;
  108. uint32_t reserved_82;
  109. uint32_t reserved_83;
  110. uint32_t reserved_84;
  111. uint32_t reserved_85;
  112. uint32_t reserved_86;
  113. uint32_t reserved_87;
  114. uint32_t reserved_88;
  115. uint32_t reserved_89;
  116. uint32_t reserved_90;
  117. uint32_t reserved_91;
  118. uint32_t reserved_92;
  119. uint32_t reserved_93;
  120. uint32_t reserved_94;
  121. uint32_t reserved_95;
  122. uint32_t reserved_96;
  123. uint32_t reserved_97;
  124. uint32_t reserved_98;
  125. uint32_t reserved_99;
  126. uint32_t reserved_100;
  127. uint32_t reserved_101;
  128. uint32_t reserved_102;
  129. uint32_t reserved_103;
  130. uint32_t reserved_104;
  131. uint32_t reserved_105;
  132. uint32_t reserved_106;
  133. uint32_t reserved_107;
  134. uint32_t reserved_108;
  135. uint32_t reserved_109;
  136. uint32_t reserved_110;
  137. uint32_t reserved_111;
  138. uint32_t reserved_112;
  139. uint32_t reserved_113;
  140. uint32_t reserved_114;
  141. uint32_t reserved_115;
  142. uint32_t reserved_116;
  143. uint32_t reserved_117;
  144. uint32_t reserved_118;
  145. uint32_t reserved_119;
  146. uint32_t reserved_120;
  147. uint32_t reserved_121;
  148. uint32_t reserved_122;
  149. uint32_t reserved_123;
  150. uint32_t reserved_124;
  151. uint32_t reserved_125;
  152. uint32_t reserved_126;
  153. uint32_t reserved_127;
  154. };
  155. struct vi_mqd {
  156. uint32_t header;
  157. uint32_t compute_dispatch_initiator;
  158. uint32_t compute_dim_x;
  159. uint32_t compute_dim_y;
  160. uint32_t compute_dim_z;
  161. uint32_t compute_start_x;
  162. uint32_t compute_start_y;
  163. uint32_t compute_start_z;
  164. uint32_t compute_num_thread_x;
  165. uint32_t compute_num_thread_y;
  166. uint32_t compute_num_thread_z;
  167. uint32_t compute_pipelinestat_enable;
  168. uint32_t compute_perfcount_enable;
  169. uint32_t compute_pgm_lo;
  170. uint32_t compute_pgm_hi;
  171. uint32_t compute_tba_lo;
  172. uint32_t compute_tba_hi;
  173. uint32_t compute_tma_lo;
  174. uint32_t compute_tma_hi;
  175. uint32_t compute_pgm_rsrc1;
  176. uint32_t compute_pgm_rsrc2;
  177. uint32_t compute_vmid;
  178. uint32_t compute_resource_limits;
  179. uint32_t compute_static_thread_mgmt_se0;
  180. uint32_t compute_static_thread_mgmt_se1;
  181. uint32_t compute_tmpring_size;
  182. uint32_t compute_static_thread_mgmt_se2;
  183. uint32_t compute_static_thread_mgmt_se3;
  184. uint32_t compute_restart_x;
  185. uint32_t compute_restart_y;
  186. uint32_t compute_restart_z;
  187. uint32_t compute_thread_trace_enable;
  188. uint32_t compute_misc_reserved;
  189. uint32_t compute_dispatch_id;
  190. uint32_t compute_threadgroup_id;
  191. uint32_t compute_relaunch;
  192. uint32_t compute_wave_restore_addr_lo;
  193. uint32_t compute_wave_restore_addr_hi;
  194. uint32_t compute_wave_restore_control;
  195. uint32_t reserved9;
  196. uint32_t reserved10;
  197. uint32_t reserved11;
  198. uint32_t reserved12;
  199. uint32_t reserved13;
  200. uint32_t reserved14;
  201. uint32_t reserved15;
  202. uint32_t reserved16;
  203. uint32_t reserved17;
  204. uint32_t reserved18;
  205. uint32_t reserved19;
  206. uint32_t reserved20;
  207. uint32_t reserved21;
  208. uint32_t reserved22;
  209. uint32_t reserved23;
  210. uint32_t reserved24;
  211. uint32_t reserved25;
  212. uint32_t reserved26;
  213. uint32_t reserved27;
  214. uint32_t reserved28;
  215. uint32_t reserved29;
  216. uint32_t reserved30;
  217. uint32_t reserved31;
  218. uint32_t reserved32;
  219. uint32_t reserved33;
  220. uint32_t reserved34;
  221. uint32_t compute_user_data_0;
  222. uint32_t compute_user_data_1;
  223. uint32_t compute_user_data_2;
  224. uint32_t compute_user_data_3;
  225. uint32_t compute_user_data_4;
  226. uint32_t compute_user_data_5;
  227. uint32_t compute_user_data_6;
  228. uint32_t compute_user_data_7;
  229. uint32_t compute_user_data_8;
  230. uint32_t compute_user_data_9;
  231. uint32_t compute_user_data_10;
  232. uint32_t compute_user_data_11;
  233. uint32_t compute_user_data_12;
  234. uint32_t compute_user_data_13;
  235. uint32_t compute_user_data_14;
  236. uint32_t compute_user_data_15;
  237. uint32_t cp_compute_csinvoc_count_lo;
  238. uint32_t cp_compute_csinvoc_count_hi;
  239. uint32_t reserved35;
  240. uint32_t reserved36;
  241. uint32_t reserved37;
  242. uint32_t cp_mqd_query_time_lo;
  243. uint32_t cp_mqd_query_time_hi;
  244. uint32_t cp_mqd_connect_start_time_lo;
  245. uint32_t cp_mqd_connect_start_time_hi;
  246. uint32_t cp_mqd_connect_end_time_lo;
  247. uint32_t cp_mqd_connect_end_time_hi;
  248. uint32_t cp_mqd_connect_end_wf_count;
  249. uint32_t cp_mqd_connect_end_pq_rptr;
  250. uint32_t cp_mqd_connect_endvi_sdma_mqd_pq_wptr;
  251. uint32_t cp_mqd_connect_end_ib_rptr;
  252. uint32_t reserved38;
  253. uint32_t reserved39;
  254. uint32_t cp_mqd_save_start_time_lo;
  255. uint32_t cp_mqd_save_start_time_hi;
  256. uint32_t cp_mqd_save_end_time_lo;
  257. uint32_t cp_mqd_save_end_time_hi;
  258. uint32_t cp_mqd_restore_start_time_lo;
  259. uint32_t cp_mqd_restore_start_time_hi;
  260. uint32_t cp_mqd_restore_end_time_lo;
  261. uint32_t cp_mqd_restore_end_time_hi;
  262. uint32_t disable_queue;
  263. uint32_t reserved41;
  264. uint32_t gds_cs_ctxsw_cnt0;
  265. uint32_t gds_cs_ctxsw_cnt1;
  266. uint32_t gds_cs_ctxsw_cnt2;
  267. uint32_t gds_cs_ctxsw_cnt3;
  268. uint32_t reserved42;
  269. uint32_t reserved43;
  270. uint32_t cp_pq_exe_status_lo;
  271. uint32_t cp_pq_exe_status_hi;
  272. uint32_t cp_packet_id_lo;
  273. uint32_t cp_packet_id_hi;
  274. uint32_t cp_packet_exe_status_lo;
  275. uint32_t cp_packet_exe_status_hi;
  276. uint32_t gds_save_base_addr_lo;
  277. uint32_t gds_save_base_addr_hi;
  278. uint32_t gds_save_mask_lo;
  279. uint32_t gds_save_mask_hi;
  280. uint32_t ctx_save_base_addr_lo;
  281. uint32_t ctx_save_base_addr_hi;
  282. uint32_t dynamic_cu_mask_addr_lo;
  283. uint32_t dynamic_cu_mask_addr_hi;
  284. uint32_t cp_mqd_base_addr_lo;
  285. uint32_t cp_mqd_base_addr_hi;
  286. uint32_t cp_hqd_active;
  287. uint32_t cp_hqd_vmid;
  288. uint32_t cp_hqd_persistent_state;
  289. uint32_t cp_hqd_pipe_priority;
  290. uint32_t cp_hqd_queue_priority;
  291. uint32_t cp_hqd_quantum;
  292. uint32_t cp_hqd_pq_base_lo;
  293. uint32_t cp_hqd_pq_base_hi;
  294. uint32_t cp_hqd_pq_rptr;
  295. uint32_t cp_hqd_pq_rptr_report_addr_lo;
  296. uint32_t cp_hqd_pq_rptr_report_addr_hi;
  297. uint32_t cp_hqd_pq_wptr_poll_addr_lo;
  298. uint32_t cp_hqd_pq_wptr_poll_addr_hi;
  299. uint32_t cp_hqd_pq_doorbell_control;
  300. uint32_t cp_hqd_pq_wptr;
  301. uint32_t cp_hqd_pq_control;
  302. uint32_t cp_hqd_ib_base_addr_lo;
  303. uint32_t cp_hqd_ib_base_addr_hi;
  304. uint32_t cp_hqd_ib_rptr;
  305. uint32_t cp_hqd_ib_control;
  306. uint32_t cp_hqd_iq_timer;
  307. uint32_t cp_hqd_iq_rptr;
  308. uint32_t cp_hqd_dequeue_request;
  309. uint32_t cp_hqd_dma_offload;
  310. uint32_t cp_hqd_sema_cmd;
  311. uint32_t cp_hqd_msg_type;
  312. uint32_t cp_hqd_atomic0_preop_lo;
  313. uint32_t cp_hqd_atomic0_preop_hi;
  314. uint32_t cp_hqd_atomic1_preop_lo;
  315. uint32_t cp_hqd_atomic1_preop_hi;
  316. uint32_t cp_hqd_hq_status0;
  317. uint32_t cp_hqd_hq_control0;
  318. uint32_t cp_mqd_control;
  319. uint32_t cp_hqd_hq_status1;
  320. uint32_t cp_hqd_hq_control1;
  321. uint32_t cp_hqd_eop_base_addr_lo;
  322. uint32_t cp_hqd_eop_base_addr_hi;
  323. uint32_t cp_hqd_eop_control;
  324. uint32_t cp_hqd_eop_rptr;
  325. uint32_t cp_hqd_eop_wptr;
  326. uint32_t cp_hqd_eop_done_events;
  327. uint32_t cp_hqd_ctx_save_base_addr_lo;
  328. uint32_t cp_hqd_ctx_save_base_addr_hi;
  329. uint32_t cp_hqd_ctx_save_control;
  330. uint32_t cp_hqd_cntl_stack_offset;
  331. uint32_t cp_hqd_cntl_stack_size;
  332. uint32_t cp_hqd_wg_state_offset;
  333. uint32_t cp_hqd_ctx_save_size;
  334. uint32_t cp_hqd_gds_resource_state;
  335. uint32_t cp_hqd_error;
  336. uint32_t cp_hqd_eop_wptr_mem;
  337. uint32_t cp_hqd_eop_dones;
  338. uint32_t reserved46;
  339. uint32_t reserved47;
  340. uint32_t reserved48;
  341. uint32_t reserved49;
  342. uint32_t reserved50;
  343. uint32_t reserved51;
  344. uint32_t reserved52;
  345. uint32_t reserved53;
  346. uint32_t reserved54;
  347. uint32_t reserved55;
  348. uint32_t iqtimer_pkt_header;
  349. uint32_t iqtimer_pkt_dw0;
  350. uint32_t iqtimer_pkt_dw1;
  351. uint32_t iqtimer_pkt_dw2;
  352. uint32_t iqtimer_pkt_dw3;
  353. uint32_t iqtimer_pkt_dw4;
  354. uint32_t iqtimer_pkt_dw5;
  355. uint32_t iqtimer_pkt_dw6;
  356. uint32_t iqtimer_pkt_dw7;
  357. uint32_t iqtimer_pkt_dw8;
  358. uint32_t iqtimer_pkt_dw9;
  359. uint32_t iqtimer_pkt_dw10;
  360. uint32_t iqtimer_pkt_dw11;
  361. uint32_t iqtimer_pkt_dw12;
  362. uint32_t iqtimer_pkt_dw13;
  363. uint32_t iqtimer_pkt_dw14;
  364. uint32_t iqtimer_pkt_dw15;
  365. uint32_t iqtimer_pkt_dw16;
  366. uint32_t iqtimer_pkt_dw17;
  367. uint32_t iqtimer_pkt_dw18;
  368. uint32_t iqtimer_pkt_dw19;
  369. uint32_t iqtimer_pkt_dw20;
  370. uint32_t iqtimer_pkt_dw21;
  371. uint32_t iqtimer_pkt_dw22;
  372. uint32_t iqtimer_pkt_dw23;
  373. uint32_t iqtimer_pkt_dw24;
  374. uint32_t iqtimer_pkt_dw25;
  375. uint32_t iqtimer_pkt_dw26;
  376. uint32_t iqtimer_pkt_dw27;
  377. uint32_t iqtimer_pkt_dw28;
  378. uint32_t iqtimer_pkt_dw29;
  379. uint32_t iqtimer_pkt_dw30;
  380. uint32_t iqtimer_pkt_dw31;
  381. uint32_t reserved56;
  382. uint32_t reserved57;
  383. uint32_t reserved58;
  384. uint32_t set_resources_header;
  385. uint32_t set_resources_dw1;
  386. uint32_t set_resources_dw2;
  387. uint32_t set_resources_dw3;
  388. uint32_t set_resources_dw4;
  389. uint32_t set_resources_dw5;
  390. uint32_t set_resources_dw6;
  391. uint32_t set_resources_dw7;
  392. uint32_t reserved59;
  393. uint32_t reserved60;
  394. uint32_t reserved61;
  395. uint32_t reserved62;
  396. uint32_t reserved63;
  397. uint32_t reserved64;
  398. uint32_t reserved65;
  399. uint32_t reserved66;
  400. uint32_t reserved67;
  401. uint32_t reserved68;
  402. uint32_t reserved69;
  403. uint32_t reserved70;
  404. uint32_t reserved71;
  405. uint32_t reserved72;
  406. uint32_t reserved73;
  407. uint32_t reserved74;
  408. uint32_t reserved75;
  409. uint32_t reserved76;
  410. uint32_t reserved77;
  411. uint32_t reserved78;
  412. uint32_t reserved_t[256];
  413. };
  414. struct vi_mqd_allocation {
  415. struct vi_mqd mqd;
  416. uint32_t wptr_poll_mem;
  417. uint32_t rptr_report_mem;
  418. uint32_t dynamic_cu_mask;
  419. uint32_t dynamic_rb_mask;
  420. };
  421. struct cz_mqd {
  422. uint32_t header;
  423. uint32_t compute_dispatch_initiator;
  424. uint32_t compute_dim_x;
  425. uint32_t compute_dim_y;
  426. uint32_t compute_dim_z;
  427. uint32_t compute_start_x;
  428. uint32_t compute_start_y;
  429. uint32_t compute_start_z;
  430. uint32_t compute_num_thread_x;
  431. uint32_t compute_num_thread_y;
  432. uint32_t compute_num_thread_z;
  433. uint32_t compute_pipelinestat_enable;
  434. uint32_t compute_perfcount_enable;
  435. uint32_t compute_pgm_lo;
  436. uint32_t compute_pgm_hi;
  437. uint32_t compute_tba_lo;
  438. uint32_t compute_tba_hi;
  439. uint32_t compute_tma_lo;
  440. uint32_t compute_tma_hi;
  441. uint32_t compute_pgm_rsrc1;
  442. uint32_t compute_pgm_rsrc2;
  443. uint32_t compute_vmid;
  444. uint32_t compute_resource_limits;
  445. uint32_t compute_static_thread_mgmt_se0;
  446. uint32_t compute_static_thread_mgmt_se1;
  447. uint32_t compute_tmpring_size;
  448. uint32_t compute_static_thread_mgmt_se2;
  449. uint32_t compute_static_thread_mgmt_se3;
  450. uint32_t compute_restart_x;
  451. uint32_t compute_restart_y;
  452. uint32_t compute_restart_z;
  453. uint32_t compute_thread_trace_enable;
  454. uint32_t compute_misc_reserved;
  455. uint32_t compute_dispatch_id;
  456. uint32_t compute_threadgroup_id;
  457. uint32_t compute_relaunch;
  458. uint32_t compute_wave_restore_addr_lo;
  459. uint32_t compute_wave_restore_addr_hi;
  460. uint32_t compute_wave_restore_control;
  461. uint32_t reserved_39;
  462. uint32_t reserved_40;
  463. uint32_t reserved_41;
  464. uint32_t reserved_42;
  465. uint32_t reserved_43;
  466. uint32_t reserved_44;
  467. uint32_t reserved_45;
  468. uint32_t reserved_46;
  469. uint32_t reserved_47;
  470. uint32_t reserved_48;
  471. uint32_t reserved_49;
  472. uint32_t reserved_50;
  473. uint32_t reserved_51;
  474. uint32_t reserved_52;
  475. uint32_t reserved_53;
  476. uint32_t reserved_54;
  477. uint32_t reserved_55;
  478. uint32_t reserved_56;
  479. uint32_t reserved_57;
  480. uint32_t reserved_58;
  481. uint32_t reserved_59;
  482. uint32_t reserved_60;
  483. uint32_t reserved_61;
  484. uint32_t reserved_62;
  485. uint32_t reserved_63;
  486. uint32_t reserved_64;
  487. uint32_t compute_user_data_0;
  488. uint32_t compute_user_data_1;
  489. uint32_t compute_user_data_2;
  490. uint32_t compute_user_data_3;
  491. uint32_t compute_user_data_4;
  492. uint32_t compute_user_data_5;
  493. uint32_t compute_user_data_6;
  494. uint32_t compute_user_data_7;
  495. uint32_t compute_user_data_8;
  496. uint32_t compute_user_data_9;
  497. uint32_t compute_user_data_10;
  498. uint32_t compute_user_data_11;
  499. uint32_t compute_user_data_12;
  500. uint32_t compute_user_data_13;
  501. uint32_t compute_user_data_14;
  502. uint32_t compute_user_data_15;
  503. uint32_t cp_compute_csinvoc_count_lo;
  504. uint32_t cp_compute_csinvoc_count_hi;
  505. uint32_t reserved_83;
  506. uint32_t reserved_84;
  507. uint32_t reserved_85;
  508. uint32_t cp_mqd_query_time_lo;
  509. uint32_t cp_mqd_query_time_hi;
  510. uint32_t cp_mqd_connect_start_time_lo;
  511. uint32_t cp_mqd_connect_start_time_hi;
  512. uint32_t cp_mqd_connect_end_time_lo;
  513. uint32_t cp_mqd_connect_end_time_hi;
  514. uint32_t cp_mqd_connect_end_wf_count;
  515. uint32_t cp_mqd_connect_end_pq_rptr;
  516. uint32_t cp_mqd_connect_end_pq_wptr;
  517. uint32_t cp_mqd_connect_end_ib_rptr;
  518. uint32_t reserved_96;
  519. uint32_t reserved_97;
  520. uint32_t cp_mqd_save_start_time_lo;
  521. uint32_t cp_mqd_save_start_time_hi;
  522. uint32_t cp_mqd_save_end_time_lo;
  523. uint32_t cp_mqd_save_end_time_hi;
  524. uint32_t cp_mqd_restore_start_time_lo;
  525. uint32_t cp_mqd_restore_start_time_hi;
  526. uint32_t cp_mqd_restore_end_time_lo;
  527. uint32_t cp_mqd_restore_end_time_hi;
  528. uint32_t reserved_106;
  529. uint32_t reserved_107;
  530. uint32_t gds_cs_ctxsw_cnt0;
  531. uint32_t gds_cs_ctxsw_cnt1;
  532. uint32_t gds_cs_ctxsw_cnt2;
  533. uint32_t gds_cs_ctxsw_cnt3;
  534. uint32_t reserved_112;
  535. uint32_t reserved_113;
  536. uint32_t cp_pq_exe_status_lo;
  537. uint32_t cp_pq_exe_status_hi;
  538. uint32_t cp_packet_id_lo;
  539. uint32_t cp_packet_id_hi;
  540. uint32_t cp_packet_exe_status_lo;
  541. uint32_t cp_packet_exe_status_hi;
  542. uint32_t gds_save_base_addr_lo;
  543. uint32_t gds_save_base_addr_hi;
  544. uint32_t gds_save_mask_lo;
  545. uint32_t gds_save_mask_hi;
  546. uint32_t ctx_save_base_addr_lo;
  547. uint32_t ctx_save_base_addr_hi;
  548. uint32_t reserved_126;
  549. uint32_t reserved_127;
  550. uint32_t cp_mqd_base_addr_lo;
  551. uint32_t cp_mqd_base_addr_hi;
  552. uint32_t cp_hqd_active;
  553. uint32_t cp_hqd_vmid;
  554. uint32_t cp_hqd_persistent_state;
  555. uint32_t cp_hqd_pipe_priority;
  556. uint32_t cp_hqd_queue_priority;
  557. uint32_t cp_hqd_quantum;
  558. uint32_t cp_hqd_pq_base_lo;
  559. uint32_t cp_hqd_pq_base_hi;
  560. uint32_t cp_hqd_pq_rptr;
  561. uint32_t cp_hqd_pq_rptr_report_addr_lo;
  562. uint32_t cp_hqd_pq_rptr_report_addr_hi;
  563. uint32_t cp_hqd_pq_wptr_poll_addr_lo;
  564. uint32_t cp_hqd_pq_wptr_poll_addr_hi;
  565. uint32_t cp_hqd_pq_doorbell_control;
  566. uint32_t cp_hqd_pq_wptr;
  567. uint32_t cp_hqd_pq_control;
  568. uint32_t cp_hqd_ib_base_addr_lo;
  569. uint32_t cp_hqd_ib_base_addr_hi;
  570. uint32_t cp_hqd_ib_rptr;
  571. uint32_t cp_hqd_ib_control;
  572. uint32_t cp_hqd_iq_timer;
  573. uint32_t cp_hqd_iq_rptr;
  574. uint32_t cp_hqd_dequeue_request;
  575. uint32_t cp_hqd_dma_offload;
  576. uint32_t cp_hqd_sema_cmd;
  577. uint32_t cp_hqd_msg_type;
  578. uint32_t cp_hqd_atomic0_preop_lo;
  579. uint32_t cp_hqd_atomic0_preop_hi;
  580. uint32_t cp_hqd_atomic1_preop_lo;
  581. uint32_t cp_hqd_atomic1_preop_hi;
  582. uint32_t cp_hqd_hq_status0;
  583. uint32_t cp_hqd_hq_control0;
  584. uint32_t cp_mqd_control;
  585. uint32_t cp_hqd_hq_status1;
  586. uint32_t cp_hqd_hq_control1;
  587. uint32_t cp_hqd_eop_base_addr_lo;
  588. uint32_t cp_hqd_eop_base_addr_hi;
  589. uint32_t cp_hqd_eop_control;
  590. uint32_t cp_hqd_eop_rptr;
  591. uint32_t cp_hqd_eop_wptr;
  592. uint32_t cp_hqd_eop_done_events;
  593. uint32_t cp_hqd_ctx_save_base_addr_lo;
  594. uint32_t cp_hqd_ctx_save_base_addr_hi;
  595. uint32_t cp_hqd_ctx_save_control;
  596. uint32_t cp_hqd_cntl_stack_offset;
  597. uint32_t cp_hqd_cntl_stack_size;
  598. uint32_t cp_hqd_wg_state_offset;
  599. uint32_t cp_hqd_ctx_save_size;
  600. uint32_t cp_hqd_gds_resource_state;
  601. uint32_t cp_hqd_error;
  602. uint32_t cp_hqd_eop_wptr_mem;
  603. uint32_t cp_hqd_eop_dones;
  604. uint32_t reserved_182;
  605. uint32_t reserved_183;
  606. uint32_t reserved_184;
  607. uint32_t reserved_185;
  608. uint32_t reserved_186;
  609. uint32_t reserved_187;
  610. uint32_t reserved_188;
  611. uint32_t reserved_189;
  612. uint32_t reserved_190;
  613. uint32_t reserved_191;
  614. uint32_t iqtimer_pkt_header;
  615. uint32_t iqtimer_pkt_dw0;
  616. uint32_t iqtimer_pkt_dw1;
  617. uint32_t iqtimer_pkt_dw2;
  618. uint32_t iqtimer_pkt_dw3;
  619. uint32_t iqtimer_pkt_dw4;
  620. uint32_t iqtimer_pkt_dw5;
  621. uint32_t iqtimer_pkt_dw6;
  622. uint32_t iqtimer_pkt_dw7;
  623. uint32_t iqtimer_pkt_dw8;
  624. uint32_t iqtimer_pkt_dw9;
  625. uint32_t iqtimer_pkt_dw10;
  626. uint32_t iqtimer_pkt_dw11;
  627. uint32_t iqtimer_pkt_dw12;
  628. uint32_t iqtimer_pkt_dw13;
  629. uint32_t iqtimer_pkt_dw14;
  630. uint32_t iqtimer_pkt_dw15;
  631. uint32_t iqtimer_pkt_dw16;
  632. uint32_t iqtimer_pkt_dw17;
  633. uint32_t iqtimer_pkt_dw18;
  634. uint32_t iqtimer_pkt_dw19;
  635. uint32_t iqtimer_pkt_dw20;
  636. uint32_t iqtimer_pkt_dw21;
  637. uint32_t iqtimer_pkt_dw22;
  638. uint32_t iqtimer_pkt_dw23;
  639. uint32_t iqtimer_pkt_dw24;
  640. uint32_t iqtimer_pkt_dw25;
  641. uint32_t iqtimer_pkt_dw26;
  642. uint32_t iqtimer_pkt_dw27;
  643. uint32_t iqtimer_pkt_dw28;
  644. uint32_t iqtimer_pkt_dw29;
  645. uint32_t iqtimer_pkt_dw30;
  646. uint32_t iqtimer_pkt_dw31;
  647. uint32_t reserved_225;
  648. uint32_t reserved_226;
  649. uint32_t reserved_227;
  650. uint32_t set_resources_header;
  651. uint32_t set_resources_dw1;
  652. uint32_t set_resources_dw2;
  653. uint32_t set_resources_dw3;
  654. uint32_t set_resources_dw4;
  655. uint32_t set_resources_dw5;
  656. uint32_t set_resources_dw6;
  657. uint32_t set_resources_dw7;
  658. uint32_t reserved_236;
  659. uint32_t reserved_237;
  660. uint32_t reserved_238;
  661. uint32_t reserved_239;
  662. uint32_t queue_doorbell_id0;
  663. uint32_t queue_doorbell_id1;
  664. uint32_t queue_doorbell_id2;
  665. uint32_t queue_doorbell_id3;
  666. uint32_t queue_doorbell_id4;
  667. uint32_t queue_doorbell_id5;
  668. uint32_t queue_doorbell_id6;
  669. uint32_t queue_doorbell_id7;
  670. uint32_t queue_doorbell_id8;
  671. uint32_t queue_doorbell_id9;
  672. uint32_t queue_doorbell_id10;
  673. uint32_t queue_doorbell_id11;
  674. uint32_t queue_doorbell_id12;
  675. uint32_t queue_doorbell_id13;
  676. uint32_t queue_doorbell_id14;
  677. uint32_t queue_doorbell_id15;
  678. };
  679. struct vi_ce_ib_state {
  680. uint32_t ce_ib_completion_status;
  681. uint32_t ce_constegnine_count;
  682. uint32_t ce_ibOffset_ib1;
  683. uint32_t ce_ibOffset_ib2;
  684. }; /* Total of 4 DWORD */
  685. struct vi_de_ib_state {
  686. uint32_t ib_completion_status;
  687. uint32_t de_constEngine_count;
  688. uint32_t ib_offset_ib1;
  689. uint32_t ib_offset_ib2;
  690. uint32_t preamble_begin_ib1;
  691. uint32_t preamble_begin_ib2;
  692. uint32_t preamble_end_ib1;
  693. uint32_t preamble_end_ib2;
  694. uint32_t draw_indirect_baseLo;
  695. uint32_t draw_indirect_baseHi;
  696. uint32_t disp_indirect_baseLo;
  697. uint32_t disp_indirect_baseHi;
  698. uint32_t gds_backup_addrlo;
  699. uint32_t gds_backup_addrhi;
  700. uint32_t index_base_addrlo;
  701. uint32_t index_base_addrhi;
  702. uint32_t sample_cntl;
  703. }; /* Total of 17 DWORD */
  704. struct vi_ce_ib_state_chained_ib {
  705. /* section of non chained ib part */
  706. uint32_t ce_ib_completion_status;
  707. uint32_t ce_constegnine_count;
  708. uint32_t ce_ibOffset_ib1;
  709. uint32_t ce_ibOffset_ib2;
  710. /* section of chained ib */
  711. uint32_t ce_chainib_addrlo_ib1;
  712. uint32_t ce_chainib_addrlo_ib2;
  713. uint32_t ce_chainib_addrhi_ib1;
  714. uint32_t ce_chainib_addrhi_ib2;
  715. uint32_t ce_chainib_size_ib1;
  716. uint32_t ce_chainib_size_ib2;
  717. }; /* total 10 DWORD */
  718. struct vi_de_ib_state_chained_ib {
  719. /* section of non chained ib part */
  720. uint32_t ib_completion_status;
  721. uint32_t de_constEngine_count;
  722. uint32_t ib_offset_ib1;
  723. uint32_t ib_offset_ib2;
  724. /* section of chained ib */
  725. uint32_t chain_ib_addrlo_ib1;
  726. uint32_t chain_ib_addrlo_ib2;
  727. uint32_t chain_ib_addrhi_ib1;
  728. uint32_t chain_ib_addrhi_ib2;
  729. uint32_t chain_ib_size_ib1;
  730. uint32_t chain_ib_size_ib2;
  731. /* section of non chained ib part */
  732. uint32_t preamble_begin_ib1;
  733. uint32_t preamble_begin_ib2;
  734. uint32_t preamble_end_ib1;
  735. uint32_t preamble_end_ib2;
  736. /* section of chained ib */
  737. uint32_t chain_ib_pream_addrlo_ib1;
  738. uint32_t chain_ib_pream_addrlo_ib2;
  739. uint32_t chain_ib_pream_addrhi_ib1;
  740. uint32_t chain_ib_pream_addrhi_ib2;
  741. /* section of non chained ib part */
  742. uint32_t draw_indirect_baseLo;
  743. uint32_t draw_indirect_baseHi;
  744. uint32_t disp_indirect_baseLo;
  745. uint32_t disp_indirect_baseHi;
  746. uint32_t gds_backup_addrlo;
  747. uint32_t gds_backup_addrhi;
  748. uint32_t index_base_addrlo;
  749. uint32_t index_base_addrhi;
  750. uint32_t sample_cntl;
  751. }; /* Total of 27 DWORD */
  752. struct vi_gfx_meta_data {
  753. /* 4 DWORD, address must be 4KB aligned */
  754. struct vi_ce_ib_state ce_payload;
  755. uint32_t reserved1[60];
  756. /* 17 DWORD, address must be 64B aligned */
  757. struct vi_de_ib_state de_payload;
  758. /* PFP IB base address which get pre-empted */
  759. uint32_t DeIbBaseAddrLo;
  760. uint32_t DeIbBaseAddrHi;
  761. uint32_t reserved2[941];
  762. }; /* Total of 4K Bytes */
  763. struct vi_gfx_meta_data_chained_ib {
  764. /* 10 DWORD, address must be 4KB aligned */
  765. struct vi_ce_ib_state_chained_ib ce_payload;
  766. uint32_t reserved1[54];
  767. /* 27 DWORD, address must be 64B aligned */
  768. struct vi_de_ib_state_chained_ib de_payload;
  769. /* PFP IB base address which get pre-empted */
  770. uint32_t DeIbBaseAddrLo;
  771. uint32_t DeIbBaseAddrHi;
  772. uint32_t reserved2[931];
  773. }; /* Total of 4K Bytes */
  774. #endif /* VI_STRUCTS_H_ */