1ff758a12SBen Goz /* 2ff758a12SBen Goz * Copyright 2012 Advanced Micro Devices, Inc. 3ff758a12SBen Goz * 4ff758a12SBen Goz * Permission is hereby granted, free of charge, to any person obtaining a 5ff758a12SBen Goz * copy of this software and associated documentation files (the "Software"), 6ff758a12SBen Goz * to deal in the Software without restriction, including without limitation 7ff758a12SBen Goz * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8ff758a12SBen Goz * and/or sell copies of the Software, and to permit persons to whom the 9ff758a12SBen Goz * Software is furnished to do so, subject to the following conditions: 10ff758a12SBen Goz * 11ff758a12SBen Goz * The above copyright notice and this permission notice shall be included in 12ff758a12SBen Goz * all copies or substantial portions of the Software. 13ff758a12SBen Goz * 14ff758a12SBen Goz * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15ff758a12SBen Goz * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16ff758a12SBen Goz * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17ff758a12SBen Goz * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18ff758a12SBen Goz * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19ff758a12SBen Goz * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20ff758a12SBen Goz * OTHER DEALINGS IN THE SOFTWARE. 21ff758a12SBen Goz * 22ff758a12SBen Goz */ 23ff758a12SBen Goz 24ff758a12SBen Goz #ifndef VI_STRUCTS_H_ 25ff758a12SBen Goz #define VI_STRUCTS_H_ 26ff758a12SBen Goz 27ff758a12SBen Goz struct vi_sdma_mqd { 28ff758a12SBen Goz uint32_t sdmax_rlcx_rb_cntl; 29ff758a12SBen Goz uint32_t sdmax_rlcx_rb_base; 30ff758a12SBen Goz uint32_t sdmax_rlcx_rb_base_hi; 31ff758a12SBen Goz uint32_t sdmax_rlcx_rb_rptr; 32ff758a12SBen Goz uint32_t sdmax_rlcx_rb_wptr; 33ff758a12SBen Goz uint32_t sdmax_rlcx_rb_wptr_poll_cntl; 34ff758a12SBen Goz uint32_t sdmax_rlcx_rb_wptr_poll_addr_hi; 35ff758a12SBen Goz uint32_t sdmax_rlcx_rb_wptr_poll_addr_lo; 36ff758a12SBen Goz uint32_t sdmax_rlcx_rb_rptr_addr_hi; 37ff758a12SBen Goz uint32_t sdmax_rlcx_rb_rptr_addr_lo; 38ff758a12SBen Goz uint32_t sdmax_rlcx_ib_cntl; 39ff758a12SBen Goz uint32_t sdmax_rlcx_ib_rptr; 40ff758a12SBen Goz uint32_t sdmax_rlcx_ib_offset; 41ff758a12SBen Goz uint32_t sdmax_rlcx_ib_base_lo; 42ff758a12SBen Goz uint32_t sdmax_rlcx_ib_base_hi; 43ff758a12SBen Goz uint32_t sdmax_rlcx_ib_size; 44ff758a12SBen Goz uint32_t sdmax_rlcx_skip_cntl; 45ff758a12SBen Goz uint32_t sdmax_rlcx_context_status; 46ff758a12SBen Goz uint32_t sdmax_rlcx_doorbell; 47ff758a12SBen Goz uint32_t sdmax_rlcx_virtual_addr; 48ff758a12SBen Goz uint32_t sdmax_rlcx_ape1_cntl; 49ff758a12SBen Goz uint32_t sdmax_rlcx_doorbell_log; 50ff758a12SBen Goz uint32_t reserved_22; 51ff758a12SBen Goz uint32_t reserved_23; 52ff758a12SBen Goz uint32_t reserved_24; 53ff758a12SBen Goz uint32_t reserved_25; 54ff758a12SBen Goz uint32_t reserved_26; 55ff758a12SBen Goz uint32_t reserved_27; 56ff758a12SBen Goz uint32_t reserved_28; 57ff758a12SBen Goz uint32_t reserved_29; 58ff758a12SBen Goz uint32_t reserved_30; 59ff758a12SBen Goz uint32_t reserved_31; 60ff758a12SBen Goz uint32_t reserved_32; 61ff758a12SBen Goz uint32_t reserved_33; 62ff758a12SBen Goz uint32_t reserved_34; 63ff758a12SBen Goz uint32_t reserved_35; 64ff758a12SBen Goz uint32_t reserved_36; 65ff758a12SBen Goz uint32_t reserved_37; 66ff758a12SBen Goz uint32_t reserved_38; 67ff758a12SBen Goz uint32_t reserved_39; 68ff758a12SBen Goz uint32_t reserved_40; 69ff758a12SBen Goz uint32_t reserved_41; 70ff758a12SBen Goz uint32_t reserved_42; 71ff758a12SBen Goz uint32_t reserved_43; 72ff758a12SBen Goz uint32_t reserved_44; 73ff758a12SBen Goz uint32_t reserved_45; 74ff758a12SBen Goz uint32_t reserved_46; 75ff758a12SBen Goz uint32_t reserved_47; 76ff758a12SBen Goz uint32_t reserved_48; 77ff758a12SBen Goz uint32_t reserved_49; 78ff758a12SBen Goz uint32_t reserved_50; 79ff758a12SBen Goz uint32_t reserved_51; 80ff758a12SBen Goz uint32_t reserved_52; 81ff758a12SBen Goz uint32_t reserved_53; 82ff758a12SBen Goz uint32_t reserved_54; 83ff758a12SBen Goz uint32_t reserved_55; 84ff758a12SBen Goz uint32_t reserved_56; 85ff758a12SBen Goz uint32_t reserved_57; 86ff758a12SBen Goz uint32_t reserved_58; 87ff758a12SBen Goz uint32_t reserved_59; 88ff758a12SBen Goz uint32_t reserved_60; 89ff758a12SBen Goz uint32_t reserved_61; 90ff758a12SBen Goz uint32_t reserved_62; 91ff758a12SBen Goz uint32_t reserved_63; 92ff758a12SBen Goz uint32_t reserved_64; 93ff758a12SBen Goz uint32_t reserved_65; 94ff758a12SBen Goz uint32_t reserved_66; 95ff758a12SBen Goz uint32_t reserved_67; 96ff758a12SBen Goz uint32_t reserved_68; 97ff758a12SBen Goz uint32_t reserved_69; 98ff758a12SBen Goz uint32_t reserved_70; 99ff758a12SBen Goz uint32_t reserved_71; 100ff758a12SBen Goz uint32_t reserved_72; 101ff758a12SBen Goz uint32_t reserved_73; 102ff758a12SBen Goz uint32_t reserved_74; 103ff758a12SBen Goz uint32_t reserved_75; 104ff758a12SBen Goz uint32_t reserved_76; 105ff758a12SBen Goz uint32_t reserved_77; 106ff758a12SBen Goz uint32_t reserved_78; 107ff758a12SBen Goz uint32_t reserved_79; 108ff758a12SBen Goz uint32_t reserved_80; 109ff758a12SBen Goz uint32_t reserved_81; 110ff758a12SBen Goz uint32_t reserved_82; 111ff758a12SBen Goz uint32_t reserved_83; 112ff758a12SBen Goz uint32_t reserved_84; 113ff758a12SBen Goz uint32_t reserved_85; 114ff758a12SBen Goz uint32_t reserved_86; 115ff758a12SBen Goz uint32_t reserved_87; 116ff758a12SBen Goz uint32_t reserved_88; 117ff758a12SBen Goz uint32_t reserved_89; 118ff758a12SBen Goz uint32_t reserved_90; 119ff758a12SBen Goz uint32_t reserved_91; 120ff758a12SBen Goz uint32_t reserved_92; 121ff758a12SBen Goz uint32_t reserved_93; 122ff758a12SBen Goz uint32_t reserved_94; 123ff758a12SBen Goz uint32_t reserved_95; 124ff758a12SBen Goz uint32_t reserved_96; 125ff758a12SBen Goz uint32_t reserved_97; 126ff758a12SBen Goz uint32_t reserved_98; 127ff758a12SBen Goz uint32_t reserved_99; 128ff758a12SBen Goz uint32_t reserved_100; 129ff758a12SBen Goz uint32_t reserved_101; 130ff758a12SBen Goz uint32_t reserved_102; 131ff758a12SBen Goz uint32_t reserved_103; 132ff758a12SBen Goz uint32_t reserved_104; 133ff758a12SBen Goz uint32_t reserved_105; 134ff758a12SBen Goz uint32_t reserved_106; 135ff758a12SBen Goz uint32_t reserved_107; 136ff758a12SBen Goz uint32_t reserved_108; 137ff758a12SBen Goz uint32_t reserved_109; 138ff758a12SBen Goz uint32_t reserved_110; 139ff758a12SBen Goz uint32_t reserved_111; 140ff758a12SBen Goz uint32_t reserved_112; 141ff758a12SBen Goz uint32_t reserved_113; 142ff758a12SBen Goz uint32_t reserved_114; 143ff758a12SBen Goz uint32_t reserved_115; 144ff758a12SBen Goz uint32_t reserved_116; 145ff758a12SBen Goz uint32_t reserved_117; 146ff758a12SBen Goz uint32_t reserved_118; 147ff758a12SBen Goz uint32_t reserved_119; 148ff758a12SBen Goz uint32_t reserved_120; 149ff758a12SBen Goz uint32_t reserved_121; 150ff758a12SBen Goz uint32_t reserved_122; 151ff758a12SBen Goz uint32_t reserved_123; 152ff758a12SBen Goz uint32_t reserved_124; 153ff758a12SBen Goz uint32_t reserved_125; 154c6fd980aSOak Zeng /* reserved_126,127: repurposed for driver-internal use */ 1559807c366SPhilip Cox uint32_t sdma_engine_id; 1569807c366SPhilip Cox uint32_t sdma_queue_id; 157ff758a12SBen Goz }; 158ff758a12SBen Goz 159ff758a12SBen Goz struct vi_mqd { 160ff758a12SBen Goz uint32_t header; 161ff758a12SBen Goz uint32_t compute_dispatch_initiator; 162ff758a12SBen Goz uint32_t compute_dim_x; 163ff758a12SBen Goz uint32_t compute_dim_y; 164ff758a12SBen Goz uint32_t compute_dim_z; 165ff758a12SBen Goz uint32_t compute_start_x; 166ff758a12SBen Goz uint32_t compute_start_y; 167ff758a12SBen Goz uint32_t compute_start_z; 168ff758a12SBen Goz uint32_t compute_num_thread_x; 169ff758a12SBen Goz uint32_t compute_num_thread_y; 170ff758a12SBen Goz uint32_t compute_num_thread_z; 171ff758a12SBen Goz uint32_t compute_pipelinestat_enable; 172ff758a12SBen Goz uint32_t compute_perfcount_enable; 173ff758a12SBen Goz uint32_t compute_pgm_lo; 174ff758a12SBen Goz uint32_t compute_pgm_hi; 175ff758a12SBen Goz uint32_t compute_tba_lo; 176ff758a12SBen Goz uint32_t compute_tba_hi; 177ff758a12SBen Goz uint32_t compute_tma_lo; 178ff758a12SBen Goz uint32_t compute_tma_hi; 179ff758a12SBen Goz uint32_t compute_pgm_rsrc1; 180ff758a12SBen Goz uint32_t compute_pgm_rsrc2; 181ff758a12SBen Goz uint32_t compute_vmid; 182ff758a12SBen Goz uint32_t compute_resource_limits; 183ff758a12SBen Goz uint32_t compute_static_thread_mgmt_se0; 184ff758a12SBen Goz uint32_t compute_static_thread_mgmt_se1; 185ff758a12SBen Goz uint32_t compute_tmpring_size; 186ff758a12SBen Goz uint32_t compute_static_thread_mgmt_se2; 187ff758a12SBen Goz uint32_t compute_static_thread_mgmt_se3; 188ff758a12SBen Goz uint32_t compute_restart_x; 189ff758a12SBen Goz uint32_t compute_restart_y; 190ff758a12SBen Goz uint32_t compute_restart_z; 191ff758a12SBen Goz uint32_t compute_thread_trace_enable; 192ff758a12SBen Goz uint32_t compute_misc_reserved; 193ff758a12SBen Goz uint32_t compute_dispatch_id; 194ff758a12SBen Goz uint32_t compute_threadgroup_id; 195ff758a12SBen Goz uint32_t compute_relaunch; 196ff758a12SBen Goz uint32_t compute_wave_restore_addr_lo; 197ff758a12SBen Goz uint32_t compute_wave_restore_addr_hi; 198ff758a12SBen Goz uint32_t compute_wave_restore_control; 1996b0fa871SRex Zhu uint32_t reserved9; 2006b0fa871SRex Zhu uint32_t reserved10; 2016b0fa871SRex Zhu uint32_t reserved11; 2026b0fa871SRex Zhu uint32_t reserved12; 2036b0fa871SRex Zhu uint32_t reserved13; 2046b0fa871SRex Zhu uint32_t reserved14; 2056b0fa871SRex Zhu uint32_t reserved15; 2066b0fa871SRex Zhu uint32_t reserved16; 2076b0fa871SRex Zhu uint32_t reserved17; 2086b0fa871SRex Zhu uint32_t reserved18; 2096b0fa871SRex Zhu uint32_t reserved19; 2106b0fa871SRex Zhu uint32_t reserved20; 2116b0fa871SRex Zhu uint32_t reserved21; 2126b0fa871SRex Zhu uint32_t reserved22; 2136b0fa871SRex Zhu uint32_t reserved23; 2146b0fa871SRex Zhu uint32_t reserved24; 2156b0fa871SRex Zhu uint32_t reserved25; 2166b0fa871SRex Zhu uint32_t reserved26; 2176b0fa871SRex Zhu uint32_t reserved27; 2186b0fa871SRex Zhu uint32_t reserved28; 2196b0fa871SRex Zhu uint32_t reserved29; 2206b0fa871SRex Zhu uint32_t reserved30; 2216b0fa871SRex Zhu uint32_t reserved31; 2226b0fa871SRex Zhu uint32_t reserved32; 2236b0fa871SRex Zhu uint32_t reserved33; 2246b0fa871SRex Zhu uint32_t reserved34; 2256b0fa871SRex Zhu uint32_t compute_user_data_0; 2266b0fa871SRex Zhu uint32_t compute_user_data_1; 2276b0fa871SRex Zhu uint32_t compute_user_data_2; 2286b0fa871SRex Zhu uint32_t compute_user_data_3; 2296b0fa871SRex Zhu uint32_t compute_user_data_4; 2306b0fa871SRex Zhu uint32_t compute_user_data_5; 2316b0fa871SRex Zhu uint32_t compute_user_data_6; 2326b0fa871SRex Zhu uint32_t compute_user_data_7; 2336b0fa871SRex Zhu uint32_t compute_user_data_8; 2346b0fa871SRex Zhu uint32_t compute_user_data_9; 2356b0fa871SRex Zhu uint32_t compute_user_data_10; 2366b0fa871SRex Zhu uint32_t compute_user_data_11; 2376b0fa871SRex Zhu uint32_t compute_user_data_12; 2386b0fa871SRex Zhu uint32_t compute_user_data_13; 2396b0fa871SRex Zhu uint32_t compute_user_data_14; 2406b0fa871SRex Zhu uint32_t compute_user_data_15; 2416b0fa871SRex Zhu uint32_t cp_compute_csinvoc_count_lo; 2426b0fa871SRex Zhu uint32_t cp_compute_csinvoc_count_hi; 2436b0fa871SRex Zhu uint32_t reserved35; 2446b0fa871SRex Zhu uint32_t reserved36; 2456b0fa871SRex Zhu uint32_t reserved37; 2466b0fa871SRex Zhu uint32_t cp_mqd_query_time_lo; 2476b0fa871SRex Zhu uint32_t cp_mqd_query_time_hi; 2486b0fa871SRex Zhu uint32_t cp_mqd_connect_start_time_lo; 2496b0fa871SRex Zhu uint32_t cp_mqd_connect_start_time_hi; 2506b0fa871SRex Zhu uint32_t cp_mqd_connect_end_time_lo; 2516b0fa871SRex Zhu uint32_t cp_mqd_connect_end_time_hi; 2526b0fa871SRex Zhu uint32_t cp_mqd_connect_end_wf_count; 2536b0fa871SRex Zhu uint32_t cp_mqd_connect_end_pq_rptr; 2546b0fa871SRex Zhu uint32_t cp_mqd_connect_endvi_sdma_mqd_pq_wptr; 2556b0fa871SRex Zhu uint32_t cp_mqd_connect_end_ib_rptr; 2566b0fa871SRex Zhu uint32_t reserved38; 2576b0fa871SRex Zhu uint32_t reserved39; 2586b0fa871SRex Zhu uint32_t cp_mqd_save_start_time_lo; 2596b0fa871SRex Zhu uint32_t cp_mqd_save_start_time_hi; 2606b0fa871SRex Zhu uint32_t cp_mqd_save_end_time_lo; 2616b0fa871SRex Zhu uint32_t cp_mqd_save_end_time_hi; 2626b0fa871SRex Zhu uint32_t cp_mqd_restore_start_time_lo; 2636b0fa871SRex Zhu uint32_t cp_mqd_restore_start_time_hi; 2646b0fa871SRex Zhu uint32_t cp_mqd_restore_end_time_lo; 2656b0fa871SRex Zhu uint32_t cp_mqd_restore_end_time_hi; 2666b0fa871SRex Zhu uint32_t disable_queue; 2676b0fa871SRex Zhu uint32_t reserved41; 2686b0fa871SRex Zhu uint32_t gds_cs_ctxsw_cnt0; 2696b0fa871SRex Zhu uint32_t gds_cs_ctxsw_cnt1; 2706b0fa871SRex Zhu uint32_t gds_cs_ctxsw_cnt2; 2716b0fa871SRex Zhu uint32_t gds_cs_ctxsw_cnt3; 2726b0fa871SRex Zhu uint32_t reserved42; 2736b0fa871SRex Zhu uint32_t reserved43; 2746b0fa871SRex Zhu uint32_t cp_pq_exe_status_lo; 2756b0fa871SRex Zhu uint32_t cp_pq_exe_status_hi; 2766b0fa871SRex Zhu uint32_t cp_packet_id_lo; 2776b0fa871SRex Zhu uint32_t cp_packet_id_hi; 2786b0fa871SRex Zhu uint32_t cp_packet_exe_status_lo; 2796b0fa871SRex Zhu uint32_t cp_packet_exe_status_hi; 2806b0fa871SRex Zhu uint32_t gds_save_base_addr_lo; 2816b0fa871SRex Zhu uint32_t gds_save_base_addr_hi; 2826b0fa871SRex Zhu uint32_t gds_save_mask_lo; 2836b0fa871SRex Zhu uint32_t gds_save_mask_hi; 2846b0fa871SRex Zhu uint32_t ctx_save_base_addr_lo; 2856b0fa871SRex Zhu uint32_t ctx_save_base_addr_hi; 2866b0fa871SRex Zhu uint32_t dynamic_cu_mask_addr_lo; 2876b0fa871SRex Zhu uint32_t dynamic_cu_mask_addr_hi; 2886b0fa871SRex Zhu uint32_t cp_mqd_base_addr_lo; 2896b0fa871SRex Zhu uint32_t cp_mqd_base_addr_hi; 2906b0fa871SRex Zhu uint32_t cp_hqd_active; 2916b0fa871SRex Zhu uint32_t cp_hqd_vmid; 2926b0fa871SRex Zhu uint32_t cp_hqd_persistent_state; 2936b0fa871SRex Zhu uint32_t cp_hqd_pipe_priority; 2946b0fa871SRex Zhu uint32_t cp_hqd_queue_priority; 2956b0fa871SRex Zhu uint32_t cp_hqd_quantum; 2966b0fa871SRex Zhu uint32_t cp_hqd_pq_base_lo; 2976b0fa871SRex Zhu uint32_t cp_hqd_pq_base_hi; 2986b0fa871SRex Zhu uint32_t cp_hqd_pq_rptr; 2996b0fa871SRex Zhu uint32_t cp_hqd_pq_rptr_report_addr_lo; 3006b0fa871SRex Zhu uint32_t cp_hqd_pq_rptr_report_addr_hi; 3016b0fa871SRex Zhu uint32_t cp_hqd_pq_wptr_poll_addr_lo; 3026b0fa871SRex Zhu uint32_t cp_hqd_pq_wptr_poll_addr_hi; 3036b0fa871SRex Zhu uint32_t cp_hqd_pq_doorbell_control; 3046b0fa871SRex Zhu uint32_t cp_hqd_pq_wptr; 3056b0fa871SRex Zhu uint32_t cp_hqd_pq_control; 3066b0fa871SRex Zhu uint32_t cp_hqd_ib_base_addr_lo; 3076b0fa871SRex Zhu uint32_t cp_hqd_ib_base_addr_hi; 3086b0fa871SRex Zhu uint32_t cp_hqd_ib_rptr; 3096b0fa871SRex Zhu uint32_t cp_hqd_ib_control; 3106b0fa871SRex Zhu uint32_t cp_hqd_iq_timer; 3116b0fa871SRex Zhu uint32_t cp_hqd_iq_rptr; 3126b0fa871SRex Zhu uint32_t cp_hqd_dequeue_request; 3136b0fa871SRex Zhu uint32_t cp_hqd_dma_offload; 3146b0fa871SRex Zhu uint32_t cp_hqd_sema_cmd; 3156b0fa871SRex Zhu uint32_t cp_hqd_msg_type; 3166b0fa871SRex Zhu uint32_t cp_hqd_atomic0_preop_lo; 3176b0fa871SRex Zhu uint32_t cp_hqd_atomic0_preop_hi; 3186b0fa871SRex Zhu uint32_t cp_hqd_atomic1_preop_lo; 3196b0fa871SRex Zhu uint32_t cp_hqd_atomic1_preop_hi; 3206b0fa871SRex Zhu uint32_t cp_hqd_hq_status0; 3216b0fa871SRex Zhu uint32_t cp_hqd_hq_control0; 3226b0fa871SRex Zhu uint32_t cp_mqd_control; 3236b0fa871SRex Zhu uint32_t cp_hqd_hq_status1; 3246b0fa871SRex Zhu uint32_t cp_hqd_hq_control1; 3256b0fa871SRex Zhu uint32_t cp_hqd_eop_base_addr_lo; 3266b0fa871SRex Zhu uint32_t cp_hqd_eop_base_addr_hi; 3276b0fa871SRex Zhu uint32_t cp_hqd_eop_control; 3286b0fa871SRex Zhu uint32_t cp_hqd_eop_rptr; 3296b0fa871SRex Zhu uint32_t cp_hqd_eop_wptr; 3306b0fa871SRex Zhu uint32_t cp_hqd_eop_done_events; 3316b0fa871SRex Zhu uint32_t cp_hqd_ctx_save_base_addr_lo; 3326b0fa871SRex Zhu uint32_t cp_hqd_ctx_save_base_addr_hi; 3336b0fa871SRex Zhu uint32_t cp_hqd_ctx_save_control; 3346b0fa871SRex Zhu uint32_t cp_hqd_cntl_stack_offset; 3356b0fa871SRex Zhu uint32_t cp_hqd_cntl_stack_size; 3366b0fa871SRex Zhu uint32_t cp_hqd_wg_state_offset; 3376b0fa871SRex Zhu uint32_t cp_hqd_ctx_save_size; 3386b0fa871SRex Zhu uint32_t cp_hqd_gds_resource_state; 3396b0fa871SRex Zhu uint32_t cp_hqd_error; 3406b0fa871SRex Zhu uint32_t cp_hqd_eop_wptr_mem; 3416b0fa871SRex Zhu uint32_t cp_hqd_eop_dones; 3426b0fa871SRex Zhu uint32_t reserved46; 3436b0fa871SRex Zhu uint32_t reserved47; 3446b0fa871SRex Zhu uint32_t reserved48; 3456b0fa871SRex Zhu uint32_t reserved49; 3466b0fa871SRex Zhu uint32_t reserved50; 3476b0fa871SRex Zhu uint32_t reserved51; 3486b0fa871SRex Zhu uint32_t reserved52; 3496b0fa871SRex Zhu uint32_t reserved53; 3506b0fa871SRex Zhu uint32_t reserved54; 3516b0fa871SRex Zhu uint32_t reserved55; 3526b0fa871SRex Zhu uint32_t iqtimer_pkt_header; 3536b0fa871SRex Zhu uint32_t iqtimer_pkt_dw0; 3546b0fa871SRex Zhu uint32_t iqtimer_pkt_dw1; 3556b0fa871SRex Zhu uint32_t iqtimer_pkt_dw2; 3566b0fa871SRex Zhu uint32_t iqtimer_pkt_dw3; 3576b0fa871SRex Zhu uint32_t iqtimer_pkt_dw4; 3586b0fa871SRex Zhu uint32_t iqtimer_pkt_dw5; 3596b0fa871SRex Zhu uint32_t iqtimer_pkt_dw6; 3606b0fa871SRex Zhu uint32_t iqtimer_pkt_dw7; 3616b0fa871SRex Zhu uint32_t iqtimer_pkt_dw8; 3626b0fa871SRex Zhu uint32_t iqtimer_pkt_dw9; 3636b0fa871SRex Zhu uint32_t iqtimer_pkt_dw10; 3646b0fa871SRex Zhu uint32_t iqtimer_pkt_dw11; 3656b0fa871SRex Zhu uint32_t iqtimer_pkt_dw12; 3666b0fa871SRex Zhu uint32_t iqtimer_pkt_dw13; 3676b0fa871SRex Zhu uint32_t iqtimer_pkt_dw14; 3686b0fa871SRex Zhu uint32_t iqtimer_pkt_dw15; 3696b0fa871SRex Zhu uint32_t iqtimer_pkt_dw16; 3706b0fa871SRex Zhu uint32_t iqtimer_pkt_dw17; 3716b0fa871SRex Zhu uint32_t iqtimer_pkt_dw18; 3726b0fa871SRex Zhu uint32_t iqtimer_pkt_dw19; 3736b0fa871SRex Zhu uint32_t iqtimer_pkt_dw20; 3746b0fa871SRex Zhu uint32_t iqtimer_pkt_dw21; 3756b0fa871SRex Zhu uint32_t iqtimer_pkt_dw22; 3766b0fa871SRex Zhu uint32_t iqtimer_pkt_dw23; 3776b0fa871SRex Zhu uint32_t iqtimer_pkt_dw24; 3786b0fa871SRex Zhu uint32_t iqtimer_pkt_dw25; 3796b0fa871SRex Zhu uint32_t iqtimer_pkt_dw26; 3806b0fa871SRex Zhu uint32_t iqtimer_pkt_dw27; 3816b0fa871SRex Zhu uint32_t iqtimer_pkt_dw28; 3826b0fa871SRex Zhu uint32_t iqtimer_pkt_dw29; 3836b0fa871SRex Zhu uint32_t iqtimer_pkt_dw30; 3846b0fa871SRex Zhu uint32_t iqtimer_pkt_dw31; 3856b0fa871SRex Zhu uint32_t reserved56; 3866b0fa871SRex Zhu uint32_t reserved57; 3876b0fa871SRex Zhu uint32_t reserved58; 3886b0fa871SRex Zhu uint32_t set_resources_header; 3896b0fa871SRex Zhu uint32_t set_resources_dw1; 3906b0fa871SRex Zhu uint32_t set_resources_dw2; 3916b0fa871SRex Zhu uint32_t set_resources_dw3; 3926b0fa871SRex Zhu uint32_t set_resources_dw4; 3936b0fa871SRex Zhu uint32_t set_resources_dw5; 3946b0fa871SRex Zhu uint32_t set_resources_dw6; 3956b0fa871SRex Zhu uint32_t set_resources_dw7; 3966b0fa871SRex Zhu uint32_t reserved59; 3976b0fa871SRex Zhu uint32_t reserved60; 3986b0fa871SRex Zhu uint32_t reserved61; 3996b0fa871SRex Zhu uint32_t reserved62; 400*51a0f459SOak Zeng uint32_t queue_doorbell_id0; 401*51a0f459SOak Zeng uint32_t queue_doorbell_id1; 402*51a0f459SOak Zeng uint32_t queue_doorbell_id2; 403*51a0f459SOak Zeng uint32_t queue_doorbell_id3; 404*51a0f459SOak Zeng uint32_t queue_doorbell_id4; 405*51a0f459SOak Zeng uint32_t queue_doorbell_id5; 406*51a0f459SOak Zeng uint32_t queue_doorbell_id6; 407*51a0f459SOak Zeng uint32_t queue_doorbell_id7; 408*51a0f459SOak Zeng uint32_t queue_doorbell_id8; 409*51a0f459SOak Zeng uint32_t queue_doorbell_id9; 410*51a0f459SOak Zeng uint32_t queue_doorbell_id10; 411*51a0f459SOak Zeng uint32_t queue_doorbell_id11; 412*51a0f459SOak Zeng uint32_t queue_doorbell_id12; 413*51a0f459SOak Zeng uint32_t queue_doorbell_id13; 414*51a0f459SOak Zeng uint32_t queue_doorbell_id14; 415*51a0f459SOak Zeng uint32_t queue_doorbell_id15; 4166b0fa871SRex Zhu uint32_t reserved_t[256]; 4176b0fa871SRex Zhu }; 4186b0fa871SRex Zhu 4196b0fa871SRex Zhu struct vi_mqd_allocation { 4206b0fa871SRex Zhu struct vi_mqd mqd; 4216b0fa871SRex Zhu uint32_t wptr_poll_mem; 4226b0fa871SRex Zhu uint32_t rptr_report_mem; 4232d6fb105SAlex Deucher uint32_t dynamic_cu_mask; 4242d6fb105SAlex Deucher uint32_t dynamic_rb_mask; 4256b0fa871SRex Zhu }; 4266b0fa871SRex Zhu 42749abb980SXiangliang Yu struct vi_ce_ib_state { 42849abb980SXiangliang Yu uint32_t ce_ib_completion_status; 42949abb980SXiangliang Yu uint32_t ce_constegnine_count; 43049abb980SXiangliang Yu uint32_t ce_ibOffset_ib1; 43149abb980SXiangliang Yu uint32_t ce_ibOffset_ib2; 43249abb980SXiangliang Yu }; /* Total of 4 DWORD */ 43349abb980SXiangliang Yu 43449abb980SXiangliang Yu struct vi_de_ib_state { 43549abb980SXiangliang Yu uint32_t ib_completion_status; 43649abb980SXiangliang Yu uint32_t de_constEngine_count; 43749abb980SXiangliang Yu uint32_t ib_offset_ib1; 43849abb980SXiangliang Yu uint32_t ib_offset_ib2; 43949abb980SXiangliang Yu uint32_t preamble_begin_ib1; 44049abb980SXiangliang Yu uint32_t preamble_begin_ib2; 44149abb980SXiangliang Yu uint32_t preamble_end_ib1; 44249abb980SXiangliang Yu uint32_t preamble_end_ib2; 44349abb980SXiangliang Yu uint32_t draw_indirect_baseLo; 44449abb980SXiangliang Yu uint32_t draw_indirect_baseHi; 44549abb980SXiangliang Yu uint32_t disp_indirect_baseLo; 44649abb980SXiangliang Yu uint32_t disp_indirect_baseHi; 44749abb980SXiangliang Yu uint32_t gds_backup_addrlo; 44849abb980SXiangliang Yu uint32_t gds_backup_addrhi; 44949abb980SXiangliang Yu uint32_t index_base_addrlo; 45049abb980SXiangliang Yu uint32_t index_base_addrhi; 45149abb980SXiangliang Yu uint32_t sample_cntl; 45249abb980SXiangliang Yu }; /* Total of 17 DWORD */ 45349abb980SXiangliang Yu 45449abb980SXiangliang Yu struct vi_ce_ib_state_chained_ib { 45549abb980SXiangliang Yu /* section of non chained ib part */ 45649abb980SXiangliang Yu uint32_t ce_ib_completion_status; 45749abb980SXiangliang Yu uint32_t ce_constegnine_count; 45849abb980SXiangliang Yu uint32_t ce_ibOffset_ib1; 45949abb980SXiangliang Yu uint32_t ce_ibOffset_ib2; 46049abb980SXiangliang Yu 46149abb980SXiangliang Yu /* section of chained ib */ 46249abb980SXiangliang Yu uint32_t ce_chainib_addrlo_ib1; 46349abb980SXiangliang Yu uint32_t ce_chainib_addrlo_ib2; 46449abb980SXiangliang Yu uint32_t ce_chainib_addrhi_ib1; 46549abb980SXiangliang Yu uint32_t ce_chainib_addrhi_ib2; 46649abb980SXiangliang Yu uint32_t ce_chainib_size_ib1; 46749abb980SXiangliang Yu uint32_t ce_chainib_size_ib2; 46849abb980SXiangliang Yu }; /* total 10 DWORD */ 46949abb980SXiangliang Yu 47049abb980SXiangliang Yu struct vi_de_ib_state_chained_ib { 47149abb980SXiangliang Yu /* section of non chained ib part */ 47249abb980SXiangliang Yu uint32_t ib_completion_status; 47349abb980SXiangliang Yu uint32_t de_constEngine_count; 47449abb980SXiangliang Yu uint32_t ib_offset_ib1; 47549abb980SXiangliang Yu uint32_t ib_offset_ib2; 47649abb980SXiangliang Yu 47749abb980SXiangliang Yu /* section of chained ib */ 47849abb980SXiangliang Yu uint32_t chain_ib_addrlo_ib1; 47949abb980SXiangliang Yu uint32_t chain_ib_addrlo_ib2; 48049abb980SXiangliang Yu uint32_t chain_ib_addrhi_ib1; 48149abb980SXiangliang Yu uint32_t chain_ib_addrhi_ib2; 48249abb980SXiangliang Yu uint32_t chain_ib_size_ib1; 48349abb980SXiangliang Yu uint32_t chain_ib_size_ib2; 48449abb980SXiangliang Yu 48549abb980SXiangliang Yu /* section of non chained ib part */ 48649abb980SXiangliang Yu uint32_t preamble_begin_ib1; 48749abb980SXiangliang Yu uint32_t preamble_begin_ib2; 48849abb980SXiangliang Yu uint32_t preamble_end_ib1; 48949abb980SXiangliang Yu uint32_t preamble_end_ib2; 49049abb980SXiangliang Yu 49149abb980SXiangliang Yu /* section of chained ib */ 49249abb980SXiangliang Yu uint32_t chain_ib_pream_addrlo_ib1; 49349abb980SXiangliang Yu uint32_t chain_ib_pream_addrlo_ib2; 49449abb980SXiangliang Yu uint32_t chain_ib_pream_addrhi_ib1; 49549abb980SXiangliang Yu uint32_t chain_ib_pream_addrhi_ib2; 49649abb980SXiangliang Yu 49749abb980SXiangliang Yu /* section of non chained ib part */ 49849abb980SXiangliang Yu uint32_t draw_indirect_baseLo; 49949abb980SXiangliang Yu uint32_t draw_indirect_baseHi; 50049abb980SXiangliang Yu uint32_t disp_indirect_baseLo; 50149abb980SXiangliang Yu uint32_t disp_indirect_baseHi; 50249abb980SXiangliang Yu uint32_t gds_backup_addrlo; 50349abb980SXiangliang Yu uint32_t gds_backup_addrhi; 50449abb980SXiangliang Yu uint32_t index_base_addrlo; 50549abb980SXiangliang Yu uint32_t index_base_addrhi; 50649abb980SXiangliang Yu uint32_t sample_cntl; 50749abb980SXiangliang Yu }; /* Total of 27 DWORD */ 50849abb980SXiangliang Yu 50949abb980SXiangliang Yu struct vi_gfx_meta_data { 51049abb980SXiangliang Yu /* 4 DWORD, address must be 4KB aligned */ 51149abb980SXiangliang Yu struct vi_ce_ib_state ce_payload; 51249abb980SXiangliang Yu uint32_t reserved1[60]; 51349abb980SXiangliang Yu /* 17 DWORD, address must be 64B aligned */ 51449abb980SXiangliang Yu struct vi_de_ib_state de_payload; 51549abb980SXiangliang Yu /* PFP IB base address which get pre-empted */ 51649abb980SXiangliang Yu uint32_t DeIbBaseAddrLo; 51749abb980SXiangliang Yu uint32_t DeIbBaseAddrHi; 51849abb980SXiangliang Yu uint32_t reserved2[941]; 51949abb980SXiangliang Yu }; /* Total of 4K Bytes */ 52049abb980SXiangliang Yu 52149abb980SXiangliang Yu struct vi_gfx_meta_data_chained_ib { 52249abb980SXiangliang Yu /* 10 DWORD, address must be 4KB aligned */ 52349abb980SXiangliang Yu struct vi_ce_ib_state_chained_ib ce_payload; 52449abb980SXiangliang Yu uint32_t reserved1[54]; 52549abb980SXiangliang Yu /* 27 DWORD, address must be 64B aligned */ 52649abb980SXiangliang Yu struct vi_de_ib_state_chained_ib de_payload; 52749abb980SXiangliang Yu /* PFP IB base address which get pre-empted */ 52849abb980SXiangliang Yu uint32_t DeIbBaseAddrLo; 52949abb980SXiangliang Yu uint32_t DeIbBaseAddrHi; 53049abb980SXiangliang Yu uint32_t reserved2[931]; 53149abb980SXiangliang Yu }; /* Total of 4K Bytes */ 53249abb980SXiangliang Yu 533ff758a12SBen Goz #endif /* VI_STRUCTS_H_ */ 534