1bf215546Sopenharmony_ci<?xml version="1.0" encoding="UTF-8"?> 2bf215546Sopenharmony_ci<database xmlns="http://nouveau.freedesktop.org/" 3bf215546Sopenharmony_cixmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4bf215546Sopenharmony_cixsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd"> 5bf215546Sopenharmony_ci 6bf215546Sopenharmony_ci<enum name="vgt_event_type" varset="chip"> 7bf215546Sopenharmony_ci <value name="VS_DEALLOC" value="0"/> 8bf215546Sopenharmony_ci <value name="PS_DEALLOC" value="1"/> 9bf215546Sopenharmony_ci <value name="VS_DONE_TS" value="2"/> 10bf215546Sopenharmony_ci <value name="PS_DONE_TS" value="3"/> 11bf215546Sopenharmony_ci <value name="CACHE_FLUSH_TS" value="4"/> 12bf215546Sopenharmony_ci <value name="CONTEXT_DONE" value="5"/> 13bf215546Sopenharmony_ci <value name="CACHE_FLUSH" value="6"/> 14bf215546Sopenharmony_ci <value name="VIZQUERY_START" value="7" variants="A2XX"/> 15bf215546Sopenharmony_ci <value name="HLSQ_FLUSH" value="7" variants="A3XX-A4XX"/> 16bf215546Sopenharmony_ci <value name="VIZQUERY_END" value="8" variants="A2XX"/> 17bf215546Sopenharmony_ci <value name="SC_WAIT_WC" value="9" variants="A2XX"/> 18bf215546Sopenharmony_ci <value name="WRITE_PRIMITIVE_COUNTS" value="9" variants="A6XX"/> 19bf215546Sopenharmony_ci <value name="START_PRIMITIVE_CTRS" value="11" variants="A6XX"/> 20bf215546Sopenharmony_ci <value name="STOP_PRIMITIVE_CTRS" value="12" variants="A6XX"/> 21bf215546Sopenharmony_ci <!-- Not sure that these 4 events don't have the same meaning as on A5XX+ --> 22bf215546Sopenharmony_ci <value name="RST_PIX_CNT" value="13" variants="A2XX-A4XX"/> 23bf215546Sopenharmony_ci <value name="RST_VTX_CNT" value="14" variants="A2XX-A4XX"/> 24bf215546Sopenharmony_ci <value name="TILE_FLUSH" value="15" variants="A2XX-A4XX"/> 25bf215546Sopenharmony_ci <value name="STAT_EVENT" value="16" variants="A2XX-A4XX"/> 26bf215546Sopenharmony_ci <value name="CACHE_FLUSH_AND_INV_TS_EVENT" value="20" variants="A2XX-A4XX"/> 27bf215546Sopenharmony_ci <value name="ZPASS_DONE" value="21"/> 28bf215546Sopenharmony_ci <value name="CACHE_FLUSH_AND_INV_EVENT" value="22" variants="A2XX"/> 29bf215546Sopenharmony_ci <value name="RB_DONE_TS" value="22" variants="A3XX-"/> 30bf215546Sopenharmony_ci <value name="PERFCOUNTER_START" value="23" variants="A2XX-A4XX"/> 31bf215546Sopenharmony_ci <value name="PERFCOUNTER_STOP" value="24" variants="A2XX-A4XX"/> 32bf215546Sopenharmony_ci <value name="VS_FETCH_DONE" value="27"/> 33bf215546Sopenharmony_ci <value name="FACENESS_FLUSH" value="28" variants="A2XX-A4XX"/> 34bf215546Sopenharmony_ci 35bf215546Sopenharmony_ci <!-- a5xx events --> 36bf215546Sopenharmony_ci <value name="WT_DONE_TS" value="8" variants="A5XX-"/> 37bf215546Sopenharmony_ci <value name="START_FRAGMENT_CTRS" value="13" variants="A5XX-"/> 38bf215546Sopenharmony_ci <value name="STOP_FRAGMENT_CTRS" value="14" variants="A5XX-"/> 39bf215546Sopenharmony_ci <value name="START_COMPUTE_CTRS" value="15" variants="A5XX-"/> 40bf215546Sopenharmony_ci <value name="STOP_COMPUTE_CTRS" value="16" variants="A5XX-"/> 41bf215546Sopenharmony_ci <value name="FLUSH_SO_0" value="17" variants="A5XX-"/> 42bf215546Sopenharmony_ci <value name="FLUSH_SO_1" value="18" variants="A5XX-"/> 43bf215546Sopenharmony_ci <value name="FLUSH_SO_2" value="19" variants="A5XX-"/> 44bf215546Sopenharmony_ci <value name="FLUSH_SO_3" value="20" variants="A5XX-"/> 45bf215546Sopenharmony_ci <value name="PC_CCU_INVALIDATE_DEPTH" value="24" variants="A5XX-"/> 46bf215546Sopenharmony_ci <value name="PC_CCU_INVALIDATE_COLOR" value="25" variants="A5XX-"/> 47bf215546Sopenharmony_ci <value name="PC_CCU_RESOLVE_TS" value="26" variants="A6XX"/> 48bf215546Sopenharmony_ci <value name="PC_CCU_FLUSH_DEPTH_TS" value="28" variants="A5XX-"/> 49bf215546Sopenharmony_ci <value name="PC_CCU_FLUSH_COLOR_TS" value="29" variants="A5XX-"/> 50bf215546Sopenharmony_ci <value name="BLIT" value="30" variants="A5XX-"/> 51bf215546Sopenharmony_ci <doc> 52bf215546Sopenharmony_ci Clears based on GRAS_LRZ_CNTL configuration, could clear 53bf215546Sopenharmony_ci fast-clear buffer or LRZ direction. 54bf215546Sopenharmony_ci LRZ direction is stored at lrz_fc_offset + 0x200, has 1 byte which 55bf215546Sopenharmony_ci could be expressed by enum: 56bf215546Sopenharmony_ci CUR_DIR_DISABLED = 0x0 57bf215546Sopenharmony_ci CUR_DIR_GE = 0x1 58bf215546Sopenharmony_ci CUR_DIR_LE = 0x2 59bf215546Sopenharmony_ci CUR_DIR_UNSET = 0x3 60bf215546Sopenharmony_ci Clear of direction means setting the direction to CUR_DIR_UNSET. 61bf215546Sopenharmony_ci </doc> 62bf215546Sopenharmony_ci <value name="LRZ_CLEAR" value="37" variants="A5XX-"/> 63bf215546Sopenharmony_ci <value name="LRZ_FLUSH" value="38" variants="A5XX-"/> 64bf215546Sopenharmony_ci <value name="BLIT_OP_FILL_2D" value="39" variants="A5XX-"/> 65bf215546Sopenharmony_ci <value name="BLIT_OP_COPY_2D" value="40" variants="A5XX-"/> 66bf215546Sopenharmony_ci <value name="BLIT_OP_SCALE_2D" value="42" variants="A5XX-"/> 67bf215546Sopenharmony_ci <value name="CONTEXT_DONE_2D" value="43" variants="A5XX-"/> 68bf215546Sopenharmony_ci <value name="UNK_2C" value="44" variants="A5XX-"/> 69bf215546Sopenharmony_ci <value name="UNK_2D" value="45" variants="A5XX-"/> 70bf215546Sopenharmony_ci 71bf215546Sopenharmony_ci <!-- a6xx events --> 72bf215546Sopenharmony_ci <value name="CACHE_INVALIDATE" value="49" variants="A6XX"/> 73bf215546Sopenharmony_ci 74bf215546Sopenharmony_ci <!-- note, some of these are the same as a6xx, just named differently --> 75bf215546Sopenharmony_ci <value name="CCU_INVALIDATE_DEPTH" value="24" variants="A7XX"/> 76bf215546Sopenharmony_ci <value name="CCU_INVALIDATE_COLOR" value="25" variants="A7XX"/> 77bf215546Sopenharmony_ci <value name="CCU_RESOLVE_CLEAN" value="26" variants="A7XX"/> 78bf215546Sopenharmony_ci <value name="CCU_FLUSH_DEPTH" value="28" variants="A7XX"/> 79bf215546Sopenharmony_ci <value name="CCU_FLUSH_COLOR" value="29" variants="A7XX"/> 80bf215546Sopenharmony_ci <value name="CCU_RESOLVE" value="30" variants="A7XX"/> 81bf215546Sopenharmony_ci <value name="CCU_END_RESOLVE_GROUP" value="31" variants="A7XX"/> 82bf215546Sopenharmony_ci <value name="CCU_CLEAN_DEPTH" value="32" variants="A7XX"/> 83bf215546Sopenharmony_ci <value name="CCU_CLEAN_COLOR" value="33" variants="A7XX"/> 84bf215546Sopenharmony_ci <value name="CACHE_RESET" value="48" variants="A7XX"/> 85bf215546Sopenharmony_ci <value name="CACHE_CLEAN" value="49" variants="A7XX"/> 86bf215546Sopenharmony_ci <!-- TODO: deal with name conflicts with other gens --> 87bf215546Sopenharmony_ci <value name="CACHE_FLUSH7" value="50" variants="A7XX"/> 88bf215546Sopenharmony_ci <value name="CACHE_INVALIDATE7" value="51" variants="A7XX"/> 89bf215546Sopenharmony_ci</enum> 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ci<enum name="pc_di_primtype"> 92bf215546Sopenharmony_ci <value name="DI_PT_NONE" value="0"/> 93bf215546Sopenharmony_ci <!-- POINTLIST_PSIZE is used on a3xx/a4xx when gl_PointSize is written: --> 94bf215546Sopenharmony_ci <value name="DI_PT_POINTLIST_PSIZE" value="1"/> 95bf215546Sopenharmony_ci <value name="DI_PT_LINELIST" value="2"/> 96bf215546Sopenharmony_ci <value name="DI_PT_LINESTRIP" value="3"/> 97bf215546Sopenharmony_ci <value name="DI_PT_TRILIST" value="4"/> 98bf215546Sopenharmony_ci <value name="DI_PT_TRIFAN" value="5"/> 99bf215546Sopenharmony_ci <value name="DI_PT_TRISTRIP" value="6"/> 100bf215546Sopenharmony_ci <value name="DI_PT_LINELOOP" value="7"/> <!-- a22x, a3xx --> 101bf215546Sopenharmony_ci <value name="DI_PT_RECTLIST" value="8"/> 102bf215546Sopenharmony_ci <value name="DI_PT_POINTLIST" value="9"/> 103bf215546Sopenharmony_ci <value name="DI_PT_LINE_ADJ" value="0xa"/> 104bf215546Sopenharmony_ci <value name="DI_PT_LINESTRIP_ADJ" value="0xb"/> 105bf215546Sopenharmony_ci <value name="DI_PT_TRI_ADJ" value="0xc"/> 106bf215546Sopenharmony_ci <value name="DI_PT_TRISTRIP_ADJ" value="0xd"/> 107bf215546Sopenharmony_ci 108bf215546Sopenharmony_ci <value name="DI_PT_PATCHES0" value="0x1f"/> 109bf215546Sopenharmony_ci <value name="DI_PT_PATCHES1" value="0x20"/> 110bf215546Sopenharmony_ci <value name="DI_PT_PATCHES2" value="0x21"/> 111bf215546Sopenharmony_ci <value name="DI_PT_PATCHES3" value="0x22"/> 112bf215546Sopenharmony_ci <value name="DI_PT_PATCHES4" value="0x23"/> 113bf215546Sopenharmony_ci <value name="DI_PT_PATCHES5" value="0x24"/> 114bf215546Sopenharmony_ci <value name="DI_PT_PATCHES6" value="0x25"/> 115bf215546Sopenharmony_ci <value name="DI_PT_PATCHES7" value="0x26"/> 116bf215546Sopenharmony_ci <value name="DI_PT_PATCHES8" value="0x27"/> 117bf215546Sopenharmony_ci <value name="DI_PT_PATCHES9" value="0x28"/> 118bf215546Sopenharmony_ci <value name="DI_PT_PATCHES10" value="0x29"/> 119bf215546Sopenharmony_ci <value name="DI_PT_PATCHES11" value="0x2a"/> 120bf215546Sopenharmony_ci <value name="DI_PT_PATCHES12" value="0x2b"/> 121bf215546Sopenharmony_ci <value name="DI_PT_PATCHES13" value="0x2c"/> 122bf215546Sopenharmony_ci <value name="DI_PT_PATCHES14" value="0x2d"/> 123bf215546Sopenharmony_ci <value name="DI_PT_PATCHES15" value="0x2e"/> 124bf215546Sopenharmony_ci <value name="DI_PT_PATCHES16" value="0x2f"/> 125bf215546Sopenharmony_ci <value name="DI_PT_PATCHES17" value="0x30"/> 126bf215546Sopenharmony_ci <value name="DI_PT_PATCHES18" value="0x31"/> 127bf215546Sopenharmony_ci <value name="DI_PT_PATCHES19" value="0x32"/> 128bf215546Sopenharmony_ci <value name="DI_PT_PATCHES20" value="0x33"/> 129bf215546Sopenharmony_ci <value name="DI_PT_PATCHES21" value="0x34"/> 130bf215546Sopenharmony_ci <value name="DI_PT_PATCHES22" value="0x35"/> 131bf215546Sopenharmony_ci <value name="DI_PT_PATCHES23" value="0x36"/> 132bf215546Sopenharmony_ci <value name="DI_PT_PATCHES24" value="0x37"/> 133bf215546Sopenharmony_ci <value name="DI_PT_PATCHES25" value="0x38"/> 134bf215546Sopenharmony_ci <value name="DI_PT_PATCHES26" value="0x39"/> 135bf215546Sopenharmony_ci <value name="DI_PT_PATCHES27" value="0x3a"/> 136bf215546Sopenharmony_ci <value name="DI_PT_PATCHES28" value="0x3b"/> 137bf215546Sopenharmony_ci <value name="DI_PT_PATCHES29" value="0x3c"/> 138bf215546Sopenharmony_ci <value name="DI_PT_PATCHES30" value="0x3d"/> 139bf215546Sopenharmony_ci <value name="DI_PT_PATCHES31" value="0x3e"/> 140bf215546Sopenharmony_ci</enum> 141bf215546Sopenharmony_ci 142bf215546Sopenharmony_ci<enum name="pc_di_src_sel"> 143bf215546Sopenharmony_ci <value name="DI_SRC_SEL_DMA" value="0"/> 144bf215546Sopenharmony_ci <value name="DI_SRC_SEL_IMMEDIATE" value="1"/> 145bf215546Sopenharmony_ci <value name="DI_SRC_SEL_AUTO_INDEX" value="2"/> 146bf215546Sopenharmony_ci <value name="DI_SRC_SEL_AUTO_XFB" value="3"/> 147bf215546Sopenharmony_ci</enum> 148bf215546Sopenharmony_ci 149bf215546Sopenharmony_ci<enum name="pc_di_face_cull_sel"> 150bf215546Sopenharmony_ci <value name="DI_FACE_CULL_NONE" value="0"/> 151bf215546Sopenharmony_ci <value name="DI_FACE_CULL_FETCH" value="1"/> 152bf215546Sopenharmony_ci <value name="DI_FACE_BACKFACE_CULL" value="2"/> 153bf215546Sopenharmony_ci <value name="DI_FACE_FRONTFACE_CULL" value="3"/> 154bf215546Sopenharmony_ci</enum> 155bf215546Sopenharmony_ci 156bf215546Sopenharmony_ci<enum name="pc_di_index_size"> 157bf215546Sopenharmony_ci <value name="INDEX_SIZE_IGN" value="0"/> 158bf215546Sopenharmony_ci <value name="INDEX_SIZE_16_BIT" value="0"/> 159bf215546Sopenharmony_ci <value name="INDEX_SIZE_32_BIT" value="1"/> 160bf215546Sopenharmony_ci <value name="INDEX_SIZE_8_BIT" value="2"/> 161bf215546Sopenharmony_ci <value name="INDEX_SIZE_INVALID"/> 162bf215546Sopenharmony_ci</enum> 163bf215546Sopenharmony_ci 164bf215546Sopenharmony_ci<enum name="pc_di_vis_cull_mode"> 165bf215546Sopenharmony_ci <value name="IGNORE_VISIBILITY" value="0"/> 166bf215546Sopenharmony_ci <value name="USE_VISIBILITY" value="1"/> 167bf215546Sopenharmony_ci</enum> 168bf215546Sopenharmony_ci 169bf215546Sopenharmony_ci<enum name="adreno_pm4_packet_type"> 170bf215546Sopenharmony_ci <value name="CP_TYPE0_PKT" value="0x00000000"/> 171bf215546Sopenharmony_ci <value name="CP_TYPE1_PKT" value="0x40000000"/> 172bf215546Sopenharmony_ci <value name="CP_TYPE2_PKT" value="0x80000000"/> 173bf215546Sopenharmony_ci <value name="CP_TYPE3_PKT" value="0xc0000000"/> 174bf215546Sopenharmony_ci <value name="CP_TYPE4_PKT" value="0x40000000"/> 175bf215546Sopenharmony_ci <value name="CP_TYPE7_PKT" value="0x70000000"/> 176bf215546Sopenharmony_ci</enum> 177bf215546Sopenharmony_ci 178bf215546Sopenharmony_ci<!-- 179bf215546Sopenharmony_ci Note that in some cases, the same packet id is recycled on a later 180bf215546Sopenharmony_ci generation, so variants attribute is used to distinguish. They 181bf215546Sopenharmony_ci may not be completely accurate, we would probably have to analyze 182bf215546Sopenharmony_ci the pfp and me/pm4 firmware to verify the packet is actually 183bf215546Sopenharmony_ci handled on a particular generation. But it is at least enough to 184bf215546Sopenharmony_ci disambiguate the packet-id's that were re-used for different 185bf215546Sopenharmony_ci packets starting with a5xx. 186bf215546Sopenharmony_ci --> 187bf215546Sopenharmony_ci<enum name="adreno_pm4_type3_packets" varset="chip"> 188bf215546Sopenharmony_ci <doc>initialize CP's micro-engine</doc> 189bf215546Sopenharmony_ci <value name="CP_ME_INIT" value="0x48"/> 190bf215546Sopenharmony_ci <doc>skip N 32-bit words to get to the next packet</doc> 191bf215546Sopenharmony_ci <value name="CP_NOP" value="0x10"/> 192bf215546Sopenharmony_ci <doc> 193bf215546Sopenharmony_ci indirect buffer dispatch. prefetch parser uses this packet 194bf215546Sopenharmony_ci type to determine whether to pre-fetch the IB 195bf215546Sopenharmony_ci </doc> 196bf215546Sopenharmony_ci <value name="CP_PREEMPT_ENABLE" value="0x1c"/> 197bf215546Sopenharmony_ci <value name="CP_PREEMPT_TOKEN" value="0x1e"/> 198bf215546Sopenharmony_ci <value name="CP_INDIRECT_BUFFER" value="0x3f"/> 199bf215546Sopenharmony_ci <doc> 200bf215546Sopenharmony_ci Takes the same arguments as CP_INDIRECT_BUFFER, but jumps to 201bf215546Sopenharmony_ci another buffer at the same level. Must be at the end of IB, and 202bf215546Sopenharmony_ci doesn't work with draw state IB's. 203bf215546Sopenharmony_ci </doc> 204bf215546Sopenharmony_ci <value name="CP_INDIRECT_BUFFER_CHAIN" value="0x57" variants="A5XX-"/> 205bf215546Sopenharmony_ci <doc>indirect buffer dispatch. same as IB, but init is pipelined</doc> 206bf215546Sopenharmony_ci <value name="CP_INDIRECT_BUFFER_PFD" value="0x37"/> 207bf215546Sopenharmony_ci <doc>wait for the IDLE state of the engine</doc> 208bf215546Sopenharmony_ci <value name="CP_WAIT_FOR_IDLE" value="0x26"/> 209bf215546Sopenharmony_ci <doc>wait until a register or memory location is a specific value</doc> 210bf215546Sopenharmony_ci <value name="CP_WAIT_REG_MEM" value="0x3c"/> 211bf215546Sopenharmony_ci <doc>wait until a register location is equal to a specific value</doc> 212bf215546Sopenharmony_ci <value name="CP_WAIT_REG_EQ" value="0x52"/> 213bf215546Sopenharmony_ci <doc>wait until a register location is >= a specific value</doc> 214bf215546Sopenharmony_ci <value name="CP_WAIT_REG_GTE" value="0x53" variants="A2XX-A4XX"/> 215bf215546Sopenharmony_ci <doc>wait until a read completes</doc> 216bf215546Sopenharmony_ci <value name="CP_WAIT_UNTIL_READ" value="0x5c" variants="A2XX-A4XX"/> 217bf215546Sopenharmony_ci <doc>wait until all base/size writes from an IB_PFD packet have completed</doc> 218bf215546Sopenharmony_ci <value name="CP_WAIT_IB_PFD_COMPLETE" value="0x5d"/> 219bf215546Sopenharmony_ci <doc>register read/modify/write</doc> 220bf215546Sopenharmony_ci <value name="CP_REG_RMW" value="0x21"/> 221bf215546Sopenharmony_ci <doc>Set binning configuration registers</doc> 222bf215546Sopenharmony_ci <value name="CP_SET_BIN_DATA" value="0x2f" variants="A2XX-A4XX"/> 223bf215546Sopenharmony_ci <value name="CP_SET_BIN_DATA5" value="0x2f" variants="A5XX-"/> 224bf215546Sopenharmony_ci <doc>reads register in chip and writes to memory</doc> 225bf215546Sopenharmony_ci <value name="CP_REG_TO_MEM" value="0x3e"/> 226bf215546Sopenharmony_ci <doc>write N 32-bit words to memory</doc> 227bf215546Sopenharmony_ci <value name="CP_MEM_WRITE" value="0x3d"/> 228bf215546Sopenharmony_ci <doc>write CP_PROG_COUNTER value to memory</doc> 229bf215546Sopenharmony_ci <value name="CP_MEM_WRITE_CNTR" value="0x4f"/> 230bf215546Sopenharmony_ci <doc>conditional execution of a sequence of packets</doc> 231bf215546Sopenharmony_ci <value name="CP_COND_EXEC" value="0x44"/> 232bf215546Sopenharmony_ci <doc>conditional write to memory or register</doc> 233bf215546Sopenharmony_ci <value name="CP_COND_WRITE" value="0x45" variants="A2XX-A4XX"/> 234bf215546Sopenharmony_ci <value name="CP_COND_WRITE5" value="0x45" variants="A5XX-"/> 235bf215546Sopenharmony_ci <doc>generate an event that creates a write to memory when completed</doc> 236bf215546Sopenharmony_ci <value name="CP_EVENT_WRITE" value="0x46"/> 237bf215546Sopenharmony_ci <doc>generate a VS|PS_done event</doc> 238bf215546Sopenharmony_ci <value name="CP_EVENT_WRITE_SHD" value="0x58"/> 239bf215546Sopenharmony_ci <doc>generate a cache flush done event</doc> 240bf215546Sopenharmony_ci <value name="CP_EVENT_WRITE_CFL" value="0x59"/> 241bf215546Sopenharmony_ci <doc>generate a z_pass done event</doc> 242bf215546Sopenharmony_ci <value name="CP_EVENT_WRITE_ZPD" value="0x5b"/> 243bf215546Sopenharmony_ci <doc> 244bf215546Sopenharmony_ci not sure the real name, but this seems to be what is used for 245bf215546Sopenharmony_ci opencl, instead of CP_DRAW_INDX.. 246bf215546Sopenharmony_ci </doc> 247bf215546Sopenharmony_ci <value name="CP_RUN_OPENCL" value="0x31"/> 248bf215546Sopenharmony_ci <doc>initiate fetch of index buffer and draw</doc> 249bf215546Sopenharmony_ci <value name="CP_DRAW_INDX" value="0x22"/> 250bf215546Sopenharmony_ci <doc>draw using supplied indices in packet</doc> 251bf215546Sopenharmony_ci <value name="CP_DRAW_INDX_2" value="0x36" variants="A2XX-A4XX"/> <!-- this is something different on a6xx and unused on a5xx --> 252bf215546Sopenharmony_ci <doc>initiate fetch of index buffer and binIDs and draw</doc> 253bf215546Sopenharmony_ci <value name="CP_DRAW_INDX_BIN" value="0x34" variants="A2XX-A4XX"/> 254bf215546Sopenharmony_ci <doc>initiate fetch of bin IDs and draw using supplied indices</doc> 255bf215546Sopenharmony_ci <value name="CP_DRAW_INDX_2_BIN" value="0x35" variants="A2XX-A4XX"/> 256bf215546Sopenharmony_ci <doc>begin/end initiator for viz query extent processing</doc> 257bf215546Sopenharmony_ci <value name="CP_VIZ_QUERY" value="0x23" variants="A2XX-A4XX"/> 258bf215546Sopenharmony_ci <doc>fetch state sub-blocks and initiate shader code DMAs</doc> 259bf215546Sopenharmony_ci <value name="CP_SET_STATE" value="0x25"/> 260bf215546Sopenharmony_ci <doc>load constant into chip and to memory</doc> 261bf215546Sopenharmony_ci <value name="CP_SET_CONSTANT" value="0x2d"/> 262bf215546Sopenharmony_ci <doc>load sequencer instruction memory (pointer-based)</doc> 263bf215546Sopenharmony_ci <value name="CP_IM_LOAD" value="0x27"/> 264bf215546Sopenharmony_ci <doc>load sequencer instruction memory (code embedded in packet)</doc> 265bf215546Sopenharmony_ci <value name="CP_IM_LOAD_IMMEDIATE" value="0x2b"/> 266bf215546Sopenharmony_ci <doc>load constants from a location in memory</doc> 267bf215546Sopenharmony_ci <value name="CP_LOAD_CONSTANT_CONTEXT" value="0x2e" variants="A2XX"/> 268bf215546Sopenharmony_ci <doc>selective invalidation of state pointers</doc> 269bf215546Sopenharmony_ci <value name="CP_INVALIDATE_STATE" value="0x3b"/> 270bf215546Sopenharmony_ci <doc>dynamically changes shader instruction memory partition</doc> 271bf215546Sopenharmony_ci <value name="CP_SET_SHADER_BASES" value="0x4a" variants="A2XX-A4XX"/> 272bf215546Sopenharmony_ci <doc>sets the 64-bit BIN_MASK register in the PFP</doc> 273bf215546Sopenharmony_ci <value name="CP_SET_BIN_MASK" value="0x50" variants="A2XX-A4XX"/> 274bf215546Sopenharmony_ci <doc>sets the 64-bit BIN_SELECT register in the PFP</doc> 275bf215546Sopenharmony_ci <value name="CP_SET_BIN_SELECT" value="0x51" variants="A2XX-A4XX"/> 276bf215546Sopenharmony_ci <doc>updates the current context, if needed</doc> 277bf215546Sopenharmony_ci <value name="CP_CONTEXT_UPDATE" value="0x5e"/> 278bf215546Sopenharmony_ci <doc>generate interrupt from the command stream</doc> 279bf215546Sopenharmony_ci <value name="CP_INTERRUPT" value="0x40"/> 280bf215546Sopenharmony_ci <doc>copy sequencer instruction memory to system memory</doc> 281bf215546Sopenharmony_ci <value name="CP_IM_STORE" value="0x2c" variants="A2XX"/> 282bf215546Sopenharmony_ci 283bf215546Sopenharmony_ci <!-- For a20x --> 284bf215546Sopenharmony_ci<!-- TODO handle variants.. 285bf215546Sopenharmony_ci <doc> 286bf215546Sopenharmony_ci Program an offset that will added to the BIN_BASE value of 287bf215546Sopenharmony_ci the 3D_DRAW_INDX_BIN packet 288bf215546Sopenharmony_ci </doc> 289bf215546Sopenharmony_ci <value name="CP_SET_BIN_BASE_OFFSET" value="0x4b"/> 290bf215546Sopenharmony_ci --> 291bf215546Sopenharmony_ci 292bf215546Sopenharmony_ci <!-- for a22x --> 293bf215546Sopenharmony_ci <doc> 294bf215546Sopenharmony_ci sets draw initiator flags register in PFP, gets bitwise-ORed into 295bf215546Sopenharmony_ci every draw initiator 296bf215546Sopenharmony_ci </doc> 297bf215546Sopenharmony_ci <value name="CP_SET_DRAW_INIT_FLAGS" value="0x4b"/> 298bf215546Sopenharmony_ci <doc>sets the register protection mode</doc> 299bf215546Sopenharmony_ci <value name="CP_SET_PROTECTED_MODE" value="0x5f"/> 300bf215546Sopenharmony_ci 301bf215546Sopenharmony_ci <value name="CP_BOOTSTRAP_UCODE" value="0x6f"/> 302bf215546Sopenharmony_ci 303bf215546Sopenharmony_ci <!-- for a3xx --> 304bf215546Sopenharmony_ci <doc>load high level sequencer command</doc> 305bf215546Sopenharmony_ci <value name="CP_LOAD_STATE" value="0x30" variants="A3XX"/> 306bf215546Sopenharmony_ci <value name="CP_LOAD_STATE4" value="0x30" variants="A4XX-A5XX"/> 307bf215546Sopenharmony_ci <doc>Conditionally load a IB based on a flag, prefetch enabled</doc> 308bf215546Sopenharmony_ci <value name="CP_COND_INDIRECT_BUFFER_PFE" value="0x3a"/> 309bf215546Sopenharmony_ci <doc>Conditionally load a IB based on a flag, prefetch disabled</doc> 310bf215546Sopenharmony_ci <value name="CP_COND_INDIRECT_BUFFER_PFD" value="0x32" variants="A3XX"/> 311bf215546Sopenharmony_ci <doc>Load a buffer with pre-fetch enabled</doc> 312bf215546Sopenharmony_ci <value name="CP_INDIRECT_BUFFER_PFE" value="0x3f" variants="A5XX"/> 313bf215546Sopenharmony_ci <doc>Set bin (?)</doc> 314bf215546Sopenharmony_ci <value name="CP_SET_BIN" value="0x4c" variants="A2XX"/> 315bf215546Sopenharmony_ci 316bf215546Sopenharmony_ci <doc>test 2 memory locations to dword values specified</doc> 317bf215546Sopenharmony_ci <value name="CP_TEST_TWO_MEMS" value="0x71"/> 318bf215546Sopenharmony_ci 319bf215546Sopenharmony_ci <doc>Write register, ignoring context state for context sensitive registers</doc> 320bf215546Sopenharmony_ci <value name="CP_REG_WR_NO_CTXT" value="0x78"/> 321bf215546Sopenharmony_ci 322bf215546Sopenharmony_ci <doc>Record the real-time when this packet is processed by PFP</doc> 323bf215546Sopenharmony_ci <value name="CP_RECORD_PFP_TIMESTAMP" value="0x11"/> 324bf215546Sopenharmony_ci 325bf215546Sopenharmony_ci <!-- Used to switch GPU between secure and non-secure modes --> 326bf215546Sopenharmony_ci <value name="CP_SET_SECURE_MODE" value="0x66"/> 327bf215546Sopenharmony_ci 328bf215546Sopenharmony_ci <doc>PFP waits until the FIFO between the PFP and the ME is empty</doc> 329bf215546Sopenharmony_ci <value name="CP_WAIT_FOR_ME" value="0x13"/> 330bf215546Sopenharmony_ci 331bf215546Sopenharmony_ci <!-- for a4xx --> 332bf215546Sopenharmony_ci <doc> 333bf215546Sopenharmony_ci Used a bit like CP_SET_CONSTANT on a2xx, but can write multiple 334bf215546Sopenharmony_ci groups of registers. Looks like it can be used to create state 335bf215546Sopenharmony_ci objects in GPU memory, and on state change only emit pointer 336bf215546Sopenharmony_ci (via CP_SET_DRAW_STATE), which should be nice for reducing CPU 337bf215546Sopenharmony_ci overhead: 338bf215546Sopenharmony_ci 339bf215546Sopenharmony_ci (A4x) save PM4 stream pointers to execute upon a visible draw 340bf215546Sopenharmony_ci </doc> 341bf215546Sopenharmony_ci <value name="CP_SET_DRAW_STATE" value="0x43" variants="A4XX-"/> 342bf215546Sopenharmony_ci <value name="CP_DRAW_INDX_OFFSET" value="0x38"/> 343bf215546Sopenharmony_ci <value name="CP_DRAW_INDIRECT" value="0x28" variants="A4XX-"/> 344bf215546Sopenharmony_ci <value name="CP_DRAW_INDX_INDIRECT" value="0x29" variants="A4XX-"/> 345bf215546Sopenharmony_ci <value name="CP_DRAW_INDIRECT_MULTI" value="0x2a" variants="A6XX"/> 346bf215546Sopenharmony_ci <value name="CP_DRAW_AUTO" value="0x24"/> 347bf215546Sopenharmony_ci 348bf215546Sopenharmony_ci <doc> 349bf215546Sopenharmony_ci Enable or disable predication globally. Also resets the 350bf215546Sopenharmony_ci predicate to "passing" and the local bit to enabled when 351bf215546Sopenharmony_ci enabling global predication. 352bf215546Sopenharmony_ci </doc> 353bf215546Sopenharmony_ci <value name="CP_DRAW_PRED_ENABLE_GLOBAL" value="0x19"/> 354bf215546Sopenharmony_ci 355bf215546Sopenharmony_ci <doc> 356bf215546Sopenharmony_ci Enable or disable predication locally. Unlike globally enabling 357bf215546Sopenharmony_ci predication, this packet doesn't touch any other state. 358bf215546Sopenharmony_ci Predication only happens when enabled globally and locally and a 359bf215546Sopenharmony_ci predicate has been set. This should be used for internal draws 360bf215546Sopenharmony_ci which aren't supposed to use the predication state: 361bf215546Sopenharmony_ci 362bf215546Sopenharmony_ci CP_DRAW_PRED_ENABLE_LOCAL(0) 363bf215546Sopenharmony_ci ... do draw... 364bf215546Sopenharmony_ci CP_DRAW_PRED_ENABLE_LOCAL(1) 365bf215546Sopenharmony_ci </doc> 366bf215546Sopenharmony_ci <value name="CP_DRAW_PRED_ENABLE_LOCAL" value="0x1a"/> 367bf215546Sopenharmony_ci 368bf215546Sopenharmony_ci <doc> 369bf215546Sopenharmony_ci Latch a draw predicate into the internal register. 370bf215546Sopenharmony_ci </doc> 371bf215546Sopenharmony_ci <value name="CP_DRAW_PRED_SET" value="0x4e"/> 372bf215546Sopenharmony_ci 373bf215546Sopenharmony_ci <doc> 374bf215546Sopenharmony_ci for A4xx 375bf215546Sopenharmony_ci Write to register with address that does not fit into type-0 pkt 376bf215546Sopenharmony_ci </doc> 377bf215546Sopenharmony_ci <value name="CP_WIDE_REG_WRITE" value="0x74" variants="A4XX"/> 378bf215546Sopenharmony_ci 379bf215546Sopenharmony_ci <doc>copy from ME scratch RAM to a register</doc> 380bf215546Sopenharmony_ci <value name="CP_SCRATCH_TO_REG" value="0x4d"/> 381bf215546Sopenharmony_ci 382bf215546Sopenharmony_ci <doc>Copy from REG to ME scratch RAM</doc> 383bf215546Sopenharmony_ci <value name="CP_REG_TO_SCRATCH" value="0x4a"/> 384bf215546Sopenharmony_ci 385bf215546Sopenharmony_ci <doc>Wait for memory writes to complete</doc> 386bf215546Sopenharmony_ci <value name="CP_WAIT_MEM_WRITES" value="0x12"/> 387bf215546Sopenharmony_ci 388bf215546Sopenharmony_ci <doc>Conditional execution based on register comparison</doc> 389bf215546Sopenharmony_ci <value name="CP_COND_REG_EXEC" value="0x47"/> 390bf215546Sopenharmony_ci 391bf215546Sopenharmony_ci <doc>Memory to REG copy</doc> 392bf215546Sopenharmony_ci <value name="CP_MEM_TO_REG" value="0x42"/> 393bf215546Sopenharmony_ci 394bf215546Sopenharmony_ci <value name="CP_EXEC_CS_INDIRECT" value="0x41" variants="A4XX-"/> 395bf215546Sopenharmony_ci <value name="CP_EXEC_CS" value="0x33"/> 396bf215546Sopenharmony_ci 397bf215546Sopenharmony_ci <doc> 398bf215546Sopenharmony_ci for a5xx 399bf215546Sopenharmony_ci </doc> 400bf215546Sopenharmony_ci <value name="CP_PERFCOUNTER_ACTION" value="0x50" variants="A5XX"/> 401bf215546Sopenharmony_ci <!-- switches SMMU pagetable, used on a5xx+ only --> 402bf215546Sopenharmony_ci <value name="CP_SMMU_TABLE_UPDATE" value="0x53" variants="A5XX-"/> 403bf215546Sopenharmony_ci <!-- for a6xx --> 404bf215546Sopenharmony_ci <doc>Tells CP the current mode of GPU operation</doc> 405bf215546Sopenharmony_ci <value name="CP_SET_MARKER" value="0x65" variants="A6XX"/> 406bf215546Sopenharmony_ci <doc>Instruct CP to set a few internal CP registers</doc> 407bf215546Sopenharmony_ci <value name="CP_SET_PSEUDO_REG" value="0x56" variants="A6XX"/> 408bf215546Sopenharmony_ci <!-- 409bf215546Sopenharmony_ci pairs of regid and value.. seems to be used to program some TF 410bf215546Sopenharmony_ci related regs: 411bf215546Sopenharmony_ci --> 412bf215546Sopenharmony_ci <value name="CP_CONTEXT_REG_BUNCH" value="0x5c" variants="A5XX-"/> 413bf215546Sopenharmony_ci <!-- A5XX Enable yield in RB only --> 414bf215546Sopenharmony_ci <value name="CP_YIELD_ENABLE" value="0x1c" variants="A5XX"/> 415bf215546Sopenharmony_ci <value name="CP_SKIP_IB2_ENABLE_GLOBAL" value="0x1d" variants="A5XX-"/> 416bf215546Sopenharmony_ci <value name="CP_SKIP_IB2_ENABLE_LOCAL" value="0x23" variants="A5XX-"/> 417bf215546Sopenharmony_ci <value name="CP_SET_SUBDRAW_SIZE" value="0x35" variants="A5XX-"/> 418bf215546Sopenharmony_ci <value name="CP_WHERE_AM_I" value="0x62" variants="A5XX-"/> 419bf215546Sopenharmony_ci <value name="CP_SET_VISIBILITY_OVERRIDE" value="0x64" variants="A5XX-"/> 420bf215546Sopenharmony_ci <!-- Enable/Disable/Defer A5x global preemption model --> 421bf215546Sopenharmony_ci <value name="CP_PREEMPT_ENABLE_GLOBAL" value="0x69" variants="A5XX"/> 422bf215546Sopenharmony_ci <!-- Enable/Disable A5x local preemption model --> 423bf215546Sopenharmony_ci <value name="CP_PREEMPT_ENABLE_LOCAL" value="0x6a" variants="A5XX"/> 424bf215546Sopenharmony_ci <!-- Yield token on a5xx similar to CP_PREEMPT on a4xx --> 425bf215546Sopenharmony_ci <value name="CP_CONTEXT_SWITCH_YIELD" value="0x6b" variants="A5XX"/> 426bf215546Sopenharmony_ci <!-- Inform CP about current render mode (needed for a5xx preemption) --> 427bf215546Sopenharmony_ci <value name="CP_SET_RENDER_MODE" value="0x6c" variants="A5XX"/> 428bf215546Sopenharmony_ci <value name="CP_COMPUTE_CHECKPOINT" value="0x6e" variants="A5XX"/> 429bf215546Sopenharmony_ci <!-- check if this works on earlier.. --> 430bf215546Sopenharmony_ci <value name="CP_MEM_TO_MEM" value="0x73" variants="A5XX-"/> 431bf215546Sopenharmony_ci <value name="CP_BLIT" value="0x2c" variants="A5XX-"/> 432bf215546Sopenharmony_ci 433bf215546Sopenharmony_ci <!-- Test specified bit in specified register and set predicate --> 434bf215546Sopenharmony_ci <value name="CP_REG_TEST" value="0x39" variants="A5XX-"/> 435bf215546Sopenharmony_ci 436bf215546Sopenharmony_ci <!-- 437bf215546Sopenharmony_ci Seems to set the mode flags which control which CP_SET_DRAW_STATE 438bf215546Sopenharmony_ci packets are executed, based on their ENABLE_MASK values 439bf215546Sopenharmony_ci 440bf215546Sopenharmony_ci CP_SET_MODE w/ payload of 0x1 seems to cause CP_SET_DRAW_STATE 441bf215546Sopenharmony_ci packets w/ ENABLE_MASK & 0x6 to execute immediately 442bf215546Sopenharmony_ci --> 443bf215546Sopenharmony_ci <value name="CP_SET_MODE" value="0x63" variants="A6XX"/> 444bf215546Sopenharmony_ci 445bf215546Sopenharmony_ci <!-- 446bf215546Sopenharmony_ci Seems like there are now separate blocks of state for VS vs FS/CS 447bf215546Sopenharmony_ci (probably these amounts to geometry vs fragments so that geometry 448bf215546Sopenharmony_ci stage of the pipeline for next draw can start while fragment stage 449bf215546Sopenharmony_ci of current draw is still running. The format of the payload of the 450bf215546Sopenharmony_ci packets is the same, the only difference is the offsets of the regs 451bf215546Sopenharmony_ci the firmware code that handles the packet writes. 452bf215546Sopenharmony_ci 453bf215546Sopenharmony_ci Note that for CL, starting with a6xx, the preferred # of local 454bf215546Sopenharmony_ci threads is no longer the same as the max, implying that the shader 455bf215546Sopenharmony_ci core can now run warps from unrelated shaders (ie. 456bf215546Sopenharmony_ci CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE vs 457bf215546Sopenharmony_ci CL_KERNEL_WORK_GROUP_SIZE) 458bf215546Sopenharmony_ci --> 459bf215546Sopenharmony_ci <value name="CP_LOAD_STATE6_GEOM" value="0x32" variants="A6XX"/> 460bf215546Sopenharmony_ci <value name="CP_LOAD_STATE6_FRAG" value="0x34" variants="A6XX"/> 461bf215546Sopenharmony_ci <!-- 462bf215546Sopenharmony_ci Note: For IBO state (Image/SSBOs) which have shared state across 463bf215546Sopenharmony_ci shader stages, for 3d pipeline CP_LOAD_STATE6 is used. But for 464bf215546Sopenharmony_ci compute shaders, CP_LOAD_STATE6_FRAG is used. Possibly they are 465bf215546Sopenharmony_ci interchangable. 466bf215546Sopenharmony_ci --> 467bf215546Sopenharmony_ci <value name="CP_LOAD_STATE6" value="0x36" variants="A6XX"/> 468bf215546Sopenharmony_ci 469bf215546Sopenharmony_ci <!-- internal packets: --> 470bf215546Sopenharmony_ci <value name="IN_IB_PREFETCH_END" value="0x17" variants="A2XX"/> 471bf215546Sopenharmony_ci <value name="IN_SUBBLK_PREFETCH" value="0x1f" variants="A2XX"/> 472bf215546Sopenharmony_ci <value name="IN_INSTR_PREFETCH" value="0x20" variants="A2XX"/> 473bf215546Sopenharmony_ci <value name="IN_INSTR_MATCH" value="0x47" variants="A2XX"/> 474bf215546Sopenharmony_ci <value name="IN_CONST_PREFETCH" value="0x49" variants="A2XX"/> 475bf215546Sopenharmony_ci <value name="IN_INCR_UPDT_STATE" value="0x55" variants="A2XX"/> 476bf215546Sopenharmony_ci <value name="IN_INCR_UPDT_CONST" value="0x56" variants="A2XX"/> 477bf215546Sopenharmony_ci <value name="IN_INCR_UPDT_INSTR" value="0x57" variants="A2XX"/> 478bf215546Sopenharmony_ci 479bf215546Sopenharmony_ci <!-- jmptable entry used to handle type4 packet on a5xx+: --> 480bf215546Sopenharmony_ci <value name="PKT4" value="0x04" variants="A5XX-"/> 481bf215546Sopenharmony_ci 482bf215546Sopenharmony_ci <!-- TODO do these exist on A5xx? --> 483bf215546Sopenharmony_ci <value name="CP_SCRATCH_WRITE" value="0x4c" variants="A6XX"/> 484bf215546Sopenharmony_ci <value name="CP_REG_TO_MEM_OFFSET_MEM" value="0x74" variants="A6XX"/> 485bf215546Sopenharmony_ci <value name="CP_REG_TO_MEM_OFFSET_REG" value="0x72" variants="A6XX"/> 486bf215546Sopenharmony_ci <value name="CP_WAIT_MEM_GTE" value="0x14" variants="A6XX"/> 487bf215546Sopenharmony_ci <value name="CP_WAIT_TWO_REGS" value="0x70" variants="A6XX"/> 488bf215546Sopenharmony_ci <value name="CP_MEMCPY" value="0x75" variants="A6XX"/> 489bf215546Sopenharmony_ci <value name="CP_SET_BIN_DATA5_OFFSET" value="0x2e" variants="A6XX"/> 490bf215546Sopenharmony_ci <!-- Note, kgsl calls this CP_SET_AMBLE: --> 491bf215546Sopenharmony_ci <value name="CP_SET_CTXSWITCH_IB" value="0x55" variants="A6XX"/> 492bf215546Sopenharmony_ci 493bf215546Sopenharmony_ci <!-- 494bf215546Sopenharmony_ci Seems to always have the payload: 495bf215546Sopenharmony_ci 00000002 00008801 00004010 496bf215546Sopenharmony_ci or: 497bf215546Sopenharmony_ci 00000002 00008801 00004090 498bf215546Sopenharmony_ci or: 499bf215546Sopenharmony_ci 00000002 00008801 00000010 500bf215546Sopenharmony_ci 00000002 00008801 00010010 501bf215546Sopenharmony_ci 00000002 00008801 00d64010 502bf215546Sopenharmony_ci ... 503bf215546Sopenharmony_ci Note set for compute shaders.. 504bf215546Sopenharmony_ci Is 0x8801 a register offset? 505bf215546Sopenharmony_ci This appears to be a special sort of register write packet 506bf215546Sopenharmony_ci more or less, but the firmware has some special handling.. 507bf215546Sopenharmony_ci Seems like it intercepts/modifies certain register offsets, 508bf215546Sopenharmony_ci but others are treated like a normal PKT4 reg write. I 509bf215546Sopenharmony_ci guess there are some registers that the fw controls certain 510bf215546Sopenharmony_ci bits. 511bf215546Sopenharmony_ci --> 512bf215546Sopenharmony_ci <value name="CP_REG_WRITE" value="0x6d" variants="A6XX"/> 513bf215546Sopenharmony_ci 514bf215546Sopenharmony_ci <doc> 515bf215546Sopenharmony_ci These first appear in a650_sqe.bin. They can in theory be used 516bf215546Sopenharmony_ci to loop any sequence of IB1 commands, but in practice they are 517bf215546Sopenharmony_ci used to loop over bins. There is a fixed-size per-iteration 518bf215546Sopenharmony_ci prefix, used to set per-bin state, and then the following IB1 519bf215546Sopenharmony_ci commands are executed until CP_END_BIN which are always the same 520bf215546Sopenharmony_ci for each iteration and usually contain a list of 521bf215546Sopenharmony_ci CP_INDIRECT_BUFFER calls to IB2 commands which setup state and 522bf215546Sopenharmony_ci execute restore/draw/save commands. This replaces the previous 523bf215546Sopenharmony_ci technique of just repeating the CP_INDIRECT_BUFFER calls and 524bf215546Sopenharmony_ci "unrolling" the loop. 525bf215546Sopenharmony_ci </doc> 526bf215546Sopenharmony_ci <value name="CP_START_BIN" value="0x50" variants="A6XX"/> 527bf215546Sopenharmony_ci <value name="CP_END_BIN" value="0x51" variants="A6XX"/> 528bf215546Sopenharmony_ci 529bf215546Sopenharmony_ci <value name="CP_WAIT_TIMESTAMP" value="0x14" variants="A7XX-"/> 530bf215546Sopenharmony_ci <value name="CP_THREAD_CONTROL" value="0x17" variants="A7XX-"/> 531bf215546Sopenharmony_ci</enum> 532bf215546Sopenharmony_ci 533bf215546Sopenharmony_ci 534bf215546Sopenharmony_ci<domain name="CP_LOAD_STATE" width="32"> 535bf215546Sopenharmony_ci <doc>Load state, a3xx (and later?)</doc> 536bf215546Sopenharmony_ci <enum name="adreno_state_block"> 537bf215546Sopenharmony_ci <value name="SB_VERT_TEX" value="0"/> 538bf215546Sopenharmony_ci <value name="SB_VERT_MIPADDR" value="1"/> 539bf215546Sopenharmony_ci <value name="SB_FRAG_TEX" value="2"/> 540bf215546Sopenharmony_ci <value name="SB_FRAG_MIPADDR" value="3"/> 541bf215546Sopenharmony_ci <value name="SB_VERT_SHADER" value="4"/> 542bf215546Sopenharmony_ci <value name="SB_GEOM_SHADER" value="5"/> 543bf215546Sopenharmony_ci <value name="SB_FRAG_SHADER" value="6"/> 544bf215546Sopenharmony_ci <value name="SB_COMPUTE_SHADER" value="7"/> 545bf215546Sopenharmony_ci </enum> 546bf215546Sopenharmony_ci <enum name="adreno_state_type"> 547bf215546Sopenharmony_ci <value name="ST_SHADER" value="0"/> 548bf215546Sopenharmony_ci <value name="ST_CONSTANTS" value="1"/> 549bf215546Sopenharmony_ci </enum> 550bf215546Sopenharmony_ci <enum name="adreno_state_src"> 551bf215546Sopenharmony_ci <value name="SS_DIRECT" value="0"> 552bf215546Sopenharmony_ci <doc>inline with the CP_LOAD_STATE packet</doc> 553bf215546Sopenharmony_ci </value> 554bf215546Sopenharmony_ci <value name="SS_INVALID_ALL_IC" value="2"/> 555bf215546Sopenharmony_ci <value name="SS_INVALID_PART_IC" value="3"/> 556bf215546Sopenharmony_ci <value name="SS_INDIRECT" value="4"> 557bf215546Sopenharmony_ci <doc>in buffer pointed to by EXT_SRC_ADDR</doc> 558bf215546Sopenharmony_ci </value> 559bf215546Sopenharmony_ci <value name="SS_INDIRECT_TCM" value="5"/> 560bf215546Sopenharmony_ci <value name="SS_INDIRECT_STM" value="6"/> 561bf215546Sopenharmony_ci </enum> 562bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 563bf215546Sopenharmony_ci <bitfield name="DST_OFF" low="0" high="15" type="uint"/> 564bf215546Sopenharmony_ci <bitfield name="STATE_SRC" low="16" high="18" type="adreno_state_src"/> 565bf215546Sopenharmony_ci <bitfield name="STATE_BLOCK" low="19" high="21" type="adreno_state_block"/> 566bf215546Sopenharmony_ci <bitfield name="NUM_UNIT" low="22" high="31" type="uint"/> 567bf215546Sopenharmony_ci </reg32> 568bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 569bf215546Sopenharmony_ci <bitfield name="STATE_TYPE" low="0" high="1" type="adreno_state_type"/> 570bf215546Sopenharmony_ci <bitfield name="EXT_SRC_ADDR" low="2" high="31" shr="2"/> 571bf215546Sopenharmony_ci </reg32> 572bf215546Sopenharmony_ci</domain> 573bf215546Sopenharmony_ci 574bf215546Sopenharmony_ci<domain name="CP_LOAD_STATE4" width="32" varset="chip"> 575bf215546Sopenharmony_ci <doc>Load state, a4xx+</doc> 576bf215546Sopenharmony_ci <enum name="a4xx_state_block"> 577bf215546Sopenharmony_ci <!-- 578bf215546Sopenharmony_ci unknown: 0x7 and 0xf <- seen in compute shader 579bf215546Sopenharmony_ci 580bf215546Sopenharmony_ci STATE_BLOCK = 0x6, STATE_TYPE = 0x2 possibly used for preemption? 581bf215546Sopenharmony_ci Seen in some GL shaders. Payload is NUM_UNIT dwords, and it contains 582bf215546Sopenharmony_ci the gpuaddr of the following shader constants block. DST_OFF seems 583bf215546Sopenharmony_ci to specify which shader stage: 584bf215546Sopenharmony_ci 585bf215546Sopenharmony_ci 16 -> vert 586bf215546Sopenharmony_ci 36 -> tcs 587bf215546Sopenharmony_ci 56 -> tes 588bf215546Sopenharmony_ci 76 -> geom 589bf215546Sopenharmony_ci 96 -> frag 590bf215546Sopenharmony_ci 591bf215546Sopenharmony_ci Example: 592bf215546Sopenharmony_ci 593bf215546Sopenharmony_ciopcode: CP_LOAD_STATE4 (30) (12 dwords) 594bf215546Sopenharmony_ci { DST_OFF = 16 | STATE_SRC = SS4_DIRECT | STATE_BLOCK = 0x6 | NUM_UNIT = 4 } 595bf215546Sopenharmony_ci { STATE_TYPE = 0x2 | EXT_SRC_ADDR = 0 } 596bf215546Sopenharmony_ci { EXT_SRC_ADDR_HI = 0 } 597bf215546Sopenharmony_ci 0000: c0264100 00000000 00000000 00000000 598bf215546Sopenharmony_ci 0000: 70b0000b 01180010 00000002 00000000 c0264100 00000000 00000000 00000000 599bf215546Sopenharmony_ci 600bf215546Sopenharmony_ciopcode: CP_LOAD_STATE4 (30) (4 dwords) 601bf215546Sopenharmony_ci { DST_OFF = 16 | STATE_SRC = SS4_INDIRECT | STATE_BLOCK = SB4_VS_SHADER | NUM_UNIT = 4 } 602bf215546Sopenharmony_ci { STATE_TYPE = ST4_CONSTANTS | EXT_SRC_ADDR = 0xc0264100 } 603bf215546Sopenharmony_ci { EXT_SRC_ADDR_HI = 0 } 604bf215546Sopenharmony_ci 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 605bf215546Sopenharmony_ci 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 606bf215546Sopenharmony_ci 0000: 00000040 0000000c 00000000 00000000 00000000 00000000 00000000 00000000 607bf215546Sopenharmony_ci 608bf215546Sopenharmony_ci STATE_BLOCK = 0x6, STATE_TYPE = 0x1, seen in compute shader. NUM_UNITS * 2 dwords. 609bf215546Sopenharmony_ci 610bf215546Sopenharmony_ci --> 611bf215546Sopenharmony_ci <value name="SB4_VS_TEX" value="0x0"/> 612bf215546Sopenharmony_ci <value name="SB4_HS_TEX" value="0x1"/> <!-- aka. TCS --> 613bf215546Sopenharmony_ci <value name="SB4_DS_TEX" value="0x2"/> <!-- aka. TES --> 614bf215546Sopenharmony_ci <value name="SB4_GS_TEX" value="0x3"/> 615bf215546Sopenharmony_ci <value name="SB4_FS_TEX" value="0x4"/> 616bf215546Sopenharmony_ci <value name="SB4_CS_TEX" value="0x5"/> 617bf215546Sopenharmony_ci <value name="SB4_VS_SHADER" value="0x8"/> 618bf215546Sopenharmony_ci <value name="SB4_HS_SHADER" value="0x9"/> 619bf215546Sopenharmony_ci <value name="SB4_DS_SHADER" value="0xa"/> 620bf215546Sopenharmony_ci <value name="SB4_GS_SHADER" value="0xb"/> 621bf215546Sopenharmony_ci <value name="SB4_FS_SHADER" value="0xc"/> 622bf215546Sopenharmony_ci <value name="SB4_CS_SHADER" value="0xd"/> 623bf215546Sopenharmony_ci <!-- 624bf215546Sopenharmony_ci for SSBO, STATE_TYPE=0 appears to be addresses (four dwords each), 625bf215546Sopenharmony_ci STATE_TYPE=1 sizes, STATE_TYPE=2 addresses again (two dwords each) 626bf215546Sopenharmony_ci 627bf215546Sopenharmony_ci Compute has it's own dedicated SSBO state, it seems, but the rest 628bf215546Sopenharmony_ci of the stages share state 629bf215546Sopenharmony_ci --> 630bf215546Sopenharmony_ci <value name="SB4_SSBO" value="0xe"/> 631bf215546Sopenharmony_ci <value name="SB4_CS_SSBO" value="0xf"/> 632bf215546Sopenharmony_ci </enum> 633bf215546Sopenharmony_ci <enum name="a4xx_state_type"> 634bf215546Sopenharmony_ci <value name="ST4_SHADER" value="0"/> 635bf215546Sopenharmony_ci <value name="ST4_CONSTANTS" value="1"/> 636bf215546Sopenharmony_ci <value name="ST4_UBO" value="2"/> 637bf215546Sopenharmony_ci </enum> 638bf215546Sopenharmony_ci <enum name="a4xx_state_src"> 639bf215546Sopenharmony_ci <value name="SS4_DIRECT" value="0"/> 640bf215546Sopenharmony_ci <value name="SS4_INDIRECT" value="2"/> 641bf215546Sopenharmony_ci </enum> 642bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 643bf215546Sopenharmony_ci <bitfield name="DST_OFF" low="0" high="13" type="uint"/> 644bf215546Sopenharmony_ci <bitfield name="STATE_SRC" low="16" high="17" type="a4xx_state_src"/> 645bf215546Sopenharmony_ci <bitfield name="STATE_BLOCK" low="18" high="21" type="a4xx_state_block"/> 646bf215546Sopenharmony_ci <bitfield name="NUM_UNIT" low="22" high="31" type="uint"/> 647bf215546Sopenharmony_ci </reg32> 648bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 649bf215546Sopenharmony_ci <bitfield name="STATE_TYPE" low="0" high="1" type="a4xx_state_type"/> 650bf215546Sopenharmony_ci <bitfield name="EXT_SRC_ADDR" low="2" high="31" shr="2"/> 651bf215546Sopenharmony_ci </reg32> 652bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 653bf215546Sopenharmony_ci <bitfield name="EXT_SRC_ADDR_HI" low="0" high="31" shr="0"/> 654bf215546Sopenharmony_ci </reg32> 655bf215546Sopenharmony_ci</domain> 656bf215546Sopenharmony_ci 657bf215546Sopenharmony_ci<!-- looks basically same CP_LOAD_STATE4 --> 658bf215546Sopenharmony_ci<domain name="CP_LOAD_STATE6" width="32" varset="chip"> 659bf215546Sopenharmony_ci <doc>Load state, a6xx+</doc> 660bf215546Sopenharmony_ci <enum name="a6xx_state_block"> 661bf215546Sopenharmony_ci <value name="SB6_VS_TEX" value="0x0"/> 662bf215546Sopenharmony_ci <value name="SB6_HS_TEX" value="0x1"/> <!-- aka. TCS --> 663bf215546Sopenharmony_ci <value name="SB6_DS_TEX" value="0x2"/> <!-- aka. TES --> 664bf215546Sopenharmony_ci <value name="SB6_GS_TEX" value="0x3"/> 665bf215546Sopenharmony_ci <value name="SB6_FS_TEX" value="0x4"/> 666bf215546Sopenharmony_ci <value name="SB6_CS_TEX" value="0x5"/> 667bf215546Sopenharmony_ci <value name="SB6_VS_SHADER" value="0x8"/> 668bf215546Sopenharmony_ci <value name="SB6_HS_SHADER" value="0x9"/> 669bf215546Sopenharmony_ci <value name="SB6_DS_SHADER" value="0xa"/> 670bf215546Sopenharmony_ci <value name="SB6_GS_SHADER" value="0xb"/> 671bf215546Sopenharmony_ci <value name="SB6_FS_SHADER" value="0xc"/> 672bf215546Sopenharmony_ci <value name="SB6_CS_SHADER" value="0xd"/> 673bf215546Sopenharmony_ci <value name="SB6_IBO" value="0xe"/> 674bf215546Sopenharmony_ci <value name="SB6_CS_IBO" value="0xf"/> 675bf215546Sopenharmony_ci </enum> 676bf215546Sopenharmony_ci <enum name="a6xx_state_type"> 677bf215546Sopenharmony_ci <value name="ST6_SHADER" value="0"/> 678bf215546Sopenharmony_ci <value name="ST6_CONSTANTS" value="1"/> 679bf215546Sopenharmony_ci <value name="ST6_UBO" value="2"/> 680bf215546Sopenharmony_ci <value name="ST6_IBO" value="3"/> 681bf215546Sopenharmony_ci </enum> 682bf215546Sopenharmony_ci <enum name="a6xx_state_src"> 683bf215546Sopenharmony_ci <value name="SS6_DIRECT" value="0"/> 684bf215546Sopenharmony_ci <value name="SS6_BINDLESS" value="1"/> <!-- TODO does this exist on a4xx/a5xx? --> 685bf215546Sopenharmony_ci <value name="SS6_INDIRECT" value="2"/> 686bf215546Sopenharmony_ci <doc> 687bf215546Sopenharmony_ci SS6_UBO used by the a6xx vulkan blob with tesselation constants 688bf215546Sopenharmony_ci in this case, EXT_SRC_ADDR is (ubo_id shl 16 | offset) 689bf215546Sopenharmony_ci to load constants from a UBO loaded with DST_OFF = 14 and offset 0, 690bf215546Sopenharmony_ci EXT_SRC_ADDR = 0xe0000 691bf215546Sopenharmony_ci (offset is a guess, should be in bytes given that maxUniformBufferRange=64k) 692bf215546Sopenharmony_ci </doc> 693bf215546Sopenharmony_ci <value name="SS6_UBO" value="3"/> 694bf215546Sopenharmony_ci </enum> 695bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 696bf215546Sopenharmony_ci <bitfield name="DST_OFF" low="0" high="13" type="uint"/> 697bf215546Sopenharmony_ci <bitfield name="STATE_TYPE" low="14" high="15" type="a6xx_state_type"/> 698bf215546Sopenharmony_ci <bitfield name="STATE_SRC" low="16" high="17" type="a6xx_state_src"/> 699bf215546Sopenharmony_ci <bitfield name="STATE_BLOCK" low="18" high="21" type="a6xx_state_block"/> 700bf215546Sopenharmony_ci <bitfield name="NUM_UNIT" low="22" high="31" type="uint"/> 701bf215546Sopenharmony_ci </reg32> 702bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 703bf215546Sopenharmony_ci <bitfield name="EXT_SRC_ADDR" low="2" high="31" shr="2"/> 704bf215546Sopenharmony_ci </reg32> 705bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 706bf215546Sopenharmony_ci <bitfield name="EXT_SRC_ADDR_HI" low="0" high="31" shr="0"/> 707bf215546Sopenharmony_ci </reg32> 708bf215546Sopenharmony_ci <reg64 offset="1" name="EXT_SRC_ADDR" type="address"/> 709bf215546Sopenharmony_ci</domain> 710bf215546Sopenharmony_ci 711bf215546Sopenharmony_ci<bitset name="vgt_draw_initiator" inline="yes"> 712bf215546Sopenharmony_ci <bitfield name="PRIM_TYPE" low="0" high="5" type="pc_di_primtype"/> 713bf215546Sopenharmony_ci <bitfield name="SOURCE_SELECT" low="6" high="7" type="pc_di_src_sel"/> 714bf215546Sopenharmony_ci <bitfield name="VIS_CULL" low="9" high="10" type="pc_di_vis_cull_mode"/> 715bf215546Sopenharmony_ci <bitfield name="INDEX_SIZE" pos="11" type="pc_di_index_size"/> 716bf215546Sopenharmony_ci <bitfield name="NOT_EOP" pos="12" type="boolean"/> 717bf215546Sopenharmony_ci <bitfield name="SMALL_INDEX" pos="13" type="boolean"/> 718bf215546Sopenharmony_ci <bitfield name="PRE_DRAW_INITIATOR_ENABLE" pos="14" type="boolean"/> 719bf215546Sopenharmony_ci <bitfield name="NUM_INSTANCES" low="24" high="31" type="uint"/> 720bf215546Sopenharmony_ci</bitset> 721bf215546Sopenharmony_ci 722bf215546Sopenharmony_ci<!-- changed on a4xx: --> 723bf215546Sopenharmony_ci<enum name="a4xx_index_size"> 724bf215546Sopenharmony_ci <value name="INDEX4_SIZE_8_BIT" value="0"/> 725bf215546Sopenharmony_ci <value name="INDEX4_SIZE_16_BIT" value="1"/> 726bf215546Sopenharmony_ci <value name="INDEX4_SIZE_32_BIT" value="2"/> 727bf215546Sopenharmony_ci</enum> 728bf215546Sopenharmony_ci 729bf215546Sopenharmony_ci<enum name="a6xx_patch_type"> 730bf215546Sopenharmony_ci <value name="TESS_QUADS" value="0"/> 731bf215546Sopenharmony_ci <value name="TESS_TRIANGLES" value="1"/> 732bf215546Sopenharmony_ci <value name="TESS_ISOLINES" value="2"/> 733bf215546Sopenharmony_ci</enum> 734bf215546Sopenharmony_ci 735bf215546Sopenharmony_ci<bitset name="vgt_draw_initiator_a4xx" inline="yes"> 736bf215546Sopenharmony_ci <!-- When the 0x20 bit is set, it's the number of patch vertices - 1 --> 737bf215546Sopenharmony_ci <bitfield name="PRIM_TYPE" low="0" high="5" type="pc_di_primtype"/> 738bf215546Sopenharmony_ci <bitfield name="SOURCE_SELECT" low="6" high="7" type="pc_di_src_sel"/> 739bf215546Sopenharmony_ci <bitfield name="VIS_CULL" low="8" high="9" type="pc_di_vis_cull_mode"/> 740bf215546Sopenharmony_ci <bitfield name="INDEX_SIZE" low="10" high="11" type="a4xx_index_size"/> 741bf215546Sopenharmony_ci <bitfield name="PATCH_TYPE" low="12" high="13" type="a6xx_patch_type"/> 742bf215546Sopenharmony_ci <bitfield name="GS_ENABLE" pos="16" type="boolean"/> 743bf215546Sopenharmony_ci <bitfield name="TESS_ENABLE" pos="17" type="boolean"/> 744bf215546Sopenharmony_ci</bitset> 745bf215546Sopenharmony_ci 746bf215546Sopenharmony_ci<domain name="CP_DRAW_INDX" width="32"> 747bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 748bf215546Sopenharmony_ci <bitfield name="VIZ_QUERY" low="0" high="31"/> 749bf215546Sopenharmony_ci </reg32> 750bf215546Sopenharmony_ci <reg32 offset="1" name="1" type="vgt_draw_initiator"/> 751bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 752bf215546Sopenharmony_ci <bitfield name="NUM_INDICES" low="0" high="31" type="uint"/> 753bf215546Sopenharmony_ci </reg32> 754bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 755bf215546Sopenharmony_ci <bitfield name="INDX_BASE" low="0" high="31"/> 756bf215546Sopenharmony_ci </reg32> 757bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 758bf215546Sopenharmony_ci <bitfield name="INDX_SIZE" low="0" high="31"/> 759bf215546Sopenharmony_ci </reg32> 760bf215546Sopenharmony_ci</domain> 761bf215546Sopenharmony_ci 762bf215546Sopenharmony_ci<domain name="CP_DRAW_INDX_2" width="32"> 763bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 764bf215546Sopenharmony_ci <bitfield name="VIZ_QUERY" low="0" high="31"/> 765bf215546Sopenharmony_ci </reg32> 766bf215546Sopenharmony_ci <reg32 offset="1" name="1" type="vgt_draw_initiator"/> 767bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 768bf215546Sopenharmony_ci <bitfield name="NUM_INDICES" low="0" high="31" type="uint"/> 769bf215546Sopenharmony_ci </reg32> 770bf215546Sopenharmony_ci <!-- followed by NUM_INDICES indices.. --> 771bf215546Sopenharmony_ci</domain> 772bf215546Sopenharmony_ci 773bf215546Sopenharmony_ci<domain name="CP_DRAW_INDX_OFFSET" width="32"> 774bf215546Sopenharmony_ci <reg32 offset="0" name="0" type="vgt_draw_initiator_a4xx"/> 775bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 776bf215546Sopenharmony_ci <bitfield name="NUM_INSTANCES" low="0" high="31" type="uint"/> 777bf215546Sopenharmony_ci </reg32> 778bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 779bf215546Sopenharmony_ci <bitfield name="NUM_INDICES" low="0" high="31" type="uint"/> 780bf215546Sopenharmony_ci </reg32> 781bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 782bf215546Sopenharmony_ci <bitfield name="FIRST_INDX" low="0" high="31"/> 783bf215546Sopenharmony_ci </reg32> 784bf215546Sopenharmony_ci 785bf215546Sopenharmony_ci <stripe varset="chip" variants="A5XX-"> 786bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 787bf215546Sopenharmony_ci <bitfield name="INDX_BASE_LO" low="0" high="31"/> 788bf215546Sopenharmony_ci </reg32> 789bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 790bf215546Sopenharmony_ci <bitfield name="INDX_BASE_HI" low="0" high="31"/> 791bf215546Sopenharmony_ci </reg32> 792bf215546Sopenharmony_ci <reg64 offset="4" name="INDX_BASE" type="address"/> 793bf215546Sopenharmony_ci <reg32 offset="6" name="6"> 794bf215546Sopenharmony_ci <!-- max # of elements in index buffer --> 795bf215546Sopenharmony_ci <bitfield name="MAX_INDICES" low="0" high="31"/> 796bf215546Sopenharmony_ci </reg32> 797bf215546Sopenharmony_ci </stripe> 798bf215546Sopenharmony_ci 799bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 800bf215546Sopenharmony_ci <bitfield name="INDX_BASE" low="0" high="31" type="address"/> 801bf215546Sopenharmony_ci </reg32> 802bf215546Sopenharmony_ci 803bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 804bf215546Sopenharmony_ci <bitfield name="INDX_SIZE" low="0" high="31" type="uint"/> 805bf215546Sopenharmony_ci </reg32> 806bf215546Sopenharmony_ci</domain> 807bf215546Sopenharmony_ci 808bf215546Sopenharmony_ci<domain name="CP_DRAW_INDIRECT" width="32" varset="chip" prefix="chip" variants="A4XX-"> 809bf215546Sopenharmony_ci <reg32 offset="0" name="0" type="vgt_draw_initiator_a4xx"/> 810bf215546Sopenharmony_ci <stripe varset="chip" variants="A4XX"> 811bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 812bf215546Sopenharmony_ci <bitfield name="INDIRECT" low="0" high="31"/> 813bf215546Sopenharmony_ci </reg32> 814bf215546Sopenharmony_ci </stripe> 815bf215546Sopenharmony_ci <stripe varset="chip" variants="A5XX-"> 816bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 817bf215546Sopenharmony_ci <bitfield name="INDIRECT_LO" low="0" high="31"/> 818bf215546Sopenharmony_ci </reg32> 819bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 820bf215546Sopenharmony_ci <bitfield name="INDIRECT_HI" low="0" high="31"/> 821bf215546Sopenharmony_ci </reg32> 822bf215546Sopenharmony_ci <reg64 offset="1" name="INDIRECT" type="address"/> 823bf215546Sopenharmony_ci </stripe> 824bf215546Sopenharmony_ci</domain> 825bf215546Sopenharmony_ci 826bf215546Sopenharmony_ci<domain name="CP_DRAW_INDX_INDIRECT" width="32" varset="chip" prefix="chip" variants="A4XX-"> 827bf215546Sopenharmony_ci <reg32 offset="0" name="0" type="vgt_draw_initiator_a4xx"/> 828bf215546Sopenharmony_ci <stripe varset="chip" variants="A4XX"> 829bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 830bf215546Sopenharmony_ci <bitfield name="INDX_BASE" low="0" high="31"/> 831bf215546Sopenharmony_ci </reg32> 832bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 833bf215546Sopenharmony_ci <!-- max # of bytes in index buffer --> 834bf215546Sopenharmony_ci <bitfield name="INDX_SIZE" low="0" high="31" type="uint"/> 835bf215546Sopenharmony_ci </reg32> 836bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 837bf215546Sopenharmony_ci <bitfield name="INDIRECT" low="0" high="31"/> 838bf215546Sopenharmony_ci </reg32> 839bf215546Sopenharmony_ci </stripe> 840bf215546Sopenharmony_ci <stripe varset="chip" variants="A5XX-"> 841bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 842bf215546Sopenharmony_ci <bitfield name="INDX_BASE_LO" low="0" high="31"/> 843bf215546Sopenharmony_ci </reg32> 844bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 845bf215546Sopenharmony_ci <bitfield name="INDX_BASE_HI" low="0" high="31"/> 846bf215546Sopenharmony_ci </reg32> 847bf215546Sopenharmony_ci <reg64 offset="1" name="INDX_BASE" type="address"/> 848bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 849bf215546Sopenharmony_ci <!-- max # of elements in index buffer --> 850bf215546Sopenharmony_ci <bitfield name="MAX_INDICES" low="0" high="31" type="uint"/> 851bf215546Sopenharmony_ci </reg32> 852bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 853bf215546Sopenharmony_ci <bitfield name="INDIRECT_LO" low="0" high="31"/> 854bf215546Sopenharmony_ci </reg32> 855bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 856bf215546Sopenharmony_ci <bitfield name="INDIRECT_HI" low="0" high="31"/> 857bf215546Sopenharmony_ci </reg32> 858bf215546Sopenharmony_ci <reg64 offset="4" name="INDIRECT" type="address"/> 859bf215546Sopenharmony_ci </stripe> 860bf215546Sopenharmony_ci</domain> 861bf215546Sopenharmony_ci 862bf215546Sopenharmony_ci<domain name="CP_DRAW_INDIRECT_MULTI" width="32" varset="chip" prefix="chip" variants="A6XX-"> 863bf215546Sopenharmony_ci <enum name="a6xx_draw_indirect_opcode"> 864bf215546Sopenharmony_ci <value name="INDIRECT_OP_NORMAL" value="0x2"/> 865bf215546Sopenharmony_ci <value name="INDIRECT_OP_INDEXED" value="0x4"/> 866bf215546Sopenharmony_ci <value name="INDIRECT_OP_INDIRECT_COUNT" value="0x6"/> 867bf215546Sopenharmony_ci <value name="INDIRECT_OP_INDIRECT_COUNT_INDEXED" value="0x7"/> 868bf215546Sopenharmony_ci </enum> 869bf215546Sopenharmony_ci <reg32 offset="0" name="0" type="vgt_draw_initiator_a4xx"/> 870bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 871bf215546Sopenharmony_ci <bitfield name="OPCODE" low="0" high="3" type="a6xx_draw_indirect_opcode" addvariant="yes"/> 872bf215546Sopenharmony_ci <doc> 873bf215546Sopenharmony_ci DST_OFF same as in CP_LOAD_STATE6 - vec4 VS const at this offset will 874bf215546Sopenharmony_ci be updated for each draw to {draw_id, first_vertex, first_instance, 0} 875bf215546Sopenharmony_ci value of 0 disables it 876bf215546Sopenharmony_ci </doc> 877bf215546Sopenharmony_ci <bitfield name="DST_OFF" low="8" high="21" type="hex"/> 878bf215546Sopenharmony_ci </reg32> 879bf215546Sopenharmony_ci <reg32 offset="2" name="DRAW_COUNT" type="uint"/> 880bf215546Sopenharmony_ci <stripe varset="a6xx_draw_indirect_opcode" variants="INDIRECT_OP_NORMAL"> 881bf215546Sopenharmony_ci <reg64 offset="3" name="INDIRECT" type="address"/> 882bf215546Sopenharmony_ci <reg32 offset="5" name="STRIDE" type="uint"/> 883bf215546Sopenharmony_ci </stripe> 884bf215546Sopenharmony_ci <stripe varset="a6xx_draw_indirect_opcode" variants="INDIRECT_OP_INDEXED" prefix="INDEXED"> 885bf215546Sopenharmony_ci <reg64 offset="3" name="INDEX" type="address"/> 886bf215546Sopenharmony_ci <reg32 offset="5" name="MAX_INDICES" type="uint"/> 887bf215546Sopenharmony_ci <reg64 offset="6" name="INDIRECT" type="address"/> 888bf215546Sopenharmony_ci <reg32 offset="8" name="STRIDE" type="uint"/> 889bf215546Sopenharmony_ci </stripe> 890bf215546Sopenharmony_ci <stripe varset="a6xx_draw_indirect_opcode" variants="INDIRECT_OP_INDIRECT_COUNT" prefix="INDIRECT"> 891bf215546Sopenharmony_ci <reg64 offset="3" name="INDIRECT" type="address"/> 892bf215546Sopenharmony_ci <reg64 offset="5" name="INDIRECT_COUNT" type="address"/> 893bf215546Sopenharmony_ci <reg32 offset="7" name="STRIDE" type="uint"/> 894bf215546Sopenharmony_ci </stripe> 895bf215546Sopenharmony_ci <stripe varset="a6xx_draw_indirect_opcode" variants="INDIRECT_OP_INDIRECT_COUNT_INDEXED" prefix="INDIRECT_INDEXED"> 896bf215546Sopenharmony_ci <reg64 offset="3" name="INDEX" type="address"/> 897bf215546Sopenharmony_ci <reg32 offset="5" name="MAX_INDICES" type="uint"/> 898bf215546Sopenharmony_ci <reg64 offset="6" name="INDIRECT" type="address"/> 899bf215546Sopenharmony_ci <reg64 offset="8" name="INDIRECT_COUNT" type="address"/> 900bf215546Sopenharmony_ci <reg32 offset="10" name="STRIDE" type="uint"/> 901bf215546Sopenharmony_ci </stripe> 902bf215546Sopenharmony_ci</domain> 903bf215546Sopenharmony_ci 904bf215546Sopenharmony_ci<domain name="CP_DRAW_PRED_ENABLE_GLOBAL" width="32" varset="chip"> 905bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 906bf215546Sopenharmony_ci <bitfield name="ENABLE" pos="0" type="boolean"/> 907bf215546Sopenharmony_ci </reg32> 908bf215546Sopenharmony_ci</domain> 909bf215546Sopenharmony_ci 910bf215546Sopenharmony_ci<domain name="CP_DRAW_PRED_ENABLE_LOCAL" width="32" varset="chip"> 911bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 912bf215546Sopenharmony_ci <bitfield name="ENABLE" pos="0" type="boolean"/> 913bf215546Sopenharmony_ci </reg32> 914bf215546Sopenharmony_ci</domain> 915bf215546Sopenharmony_ci 916bf215546Sopenharmony_ci<domain name="CP_DRAW_PRED_SET" width="32" varset="chip"> 917bf215546Sopenharmony_ci <enum name="cp_draw_pred_src"> 918bf215546Sopenharmony_ci <!-- 919bf215546Sopenharmony_ci Sources 1-4 seem to be about combining reading 920bf215546Sopenharmony_ci SO/primitive queries and setting the predicate, which is 921bf215546Sopenharmony_ci a DX11-specific optimization (since in DX11 you can only 922bf215546Sopenharmony_ci predicate on the result of queries). 923bf215546Sopenharmony_ci --> 924bf215546Sopenharmony_ci <value name="PRED_SRC_MEM" value="5"> 925bf215546Sopenharmony_ci <doc> 926bf215546Sopenharmony_ci Read a 64-bit value at the given address and 927bf215546Sopenharmony_ci test if it equals/doesn't equal 0. 928bf215546Sopenharmony_ci </doc> 929bf215546Sopenharmony_ci </value> 930bf215546Sopenharmony_ci </enum> 931bf215546Sopenharmony_ci <enum name="cp_draw_pred_test"> 932bf215546Sopenharmony_ci <value name="NE_0_PASS" value="0"/> 933bf215546Sopenharmony_ci <value name="EQ_0_PASS" value="1"/> 934bf215546Sopenharmony_ci </enum> 935bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 936bf215546Sopenharmony_ci <bitfield name="SRC" low="4" high="7" type="cp_draw_pred_src"/> 937bf215546Sopenharmony_ci <bitfield name="TEST" pos="8" type="cp_draw_pred_test"/> 938bf215546Sopenharmony_ci </reg32> 939bf215546Sopenharmony_ci <reg64 offset="1" name="MEM_ADDR" type="address"/> 940bf215546Sopenharmony_ci</domain> 941bf215546Sopenharmony_ci 942bf215546Sopenharmony_ci<domain name="CP_SET_DRAW_STATE" width="32" varset="chip" variants="A4XX-"> 943bf215546Sopenharmony_ci <array offset="0" stride="3" length="100"> 944bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 945bf215546Sopenharmony_ci <bitfield name="COUNT" low="0" high="15" type="uint"/> 946bf215546Sopenharmony_ci <bitfield name="DIRTY" pos="16" type="boolean"/> 947bf215546Sopenharmony_ci <bitfield name="DISABLE" pos="17" type="boolean"/> 948bf215546Sopenharmony_ci <bitfield name="DISABLE_ALL_GROUPS" pos="18" type="boolean"/> 949bf215546Sopenharmony_ci <bitfield name="LOAD_IMMED" pos="19" type="boolean"/> 950bf215546Sopenharmony_ci <bitfield name="BINNING" pos="20" varset="chip" variants="A6XX-" type="boolean"/> 951bf215546Sopenharmony_ci <bitfield name="GMEM" pos="21" varset="chip" variants="A6XX-" type="boolean"/> 952bf215546Sopenharmony_ci <bitfield name="SYSMEM" pos="22" varset="chip" variants="A6XX-" type="boolean"/> 953bf215546Sopenharmony_ci <bitfield name="GROUP_ID" low="24" high="28" type="uint"/> 954bf215546Sopenharmony_ci </reg32> 955bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 956bf215546Sopenharmony_ci <bitfield name="ADDR_LO" low="0" high="31" type="hex"/> 957bf215546Sopenharmony_ci </reg32> 958bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 959bf215546Sopenharmony_ci <bitfield name="ADDR_HI" low="0" high="31" type="hex"/> 960bf215546Sopenharmony_ci </reg32> 961bf215546Sopenharmony_ci </array> 962bf215546Sopenharmony_ci</domain> 963bf215546Sopenharmony_ci 964bf215546Sopenharmony_ci<domain name="CP_SET_BIN" width="32"> 965bf215546Sopenharmony_ci <doc>value at offset 0 always seems to be 0x00000000..</doc> 966bf215546Sopenharmony_ci <reg32 offset="0" name="0"/> 967bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 968bf215546Sopenharmony_ci <bitfield name="X1" low="0" high="15" type="uint"/> 969bf215546Sopenharmony_ci <bitfield name="Y1" low="16" high="31" type="uint"/> 970bf215546Sopenharmony_ci </reg32> 971bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 972bf215546Sopenharmony_ci <bitfield name="X2" low="0" high="15" type="uint"/> 973bf215546Sopenharmony_ci <bitfield name="Y2" low="16" high="31" type="uint"/> 974bf215546Sopenharmony_ci </reg32> 975bf215546Sopenharmony_ci</domain> 976bf215546Sopenharmony_ci 977bf215546Sopenharmony_ci<domain name="CP_SET_BIN_DATA" width="32"> 978bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 979bf215546Sopenharmony_ci <!-- corresponds to VSC_PIPE[n].DATA_ADDR --> 980bf215546Sopenharmony_ci <bitfield name="BIN_DATA_ADDR" low="0" high="31" type="hex"/> 981bf215546Sopenharmony_ci </reg32> 982bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 983bf215546Sopenharmony_ci <!-- seesm to correspond to VSC_SIZE_ADDRESS --> 984bf215546Sopenharmony_ci <bitfield name="BIN_SIZE_ADDRESS" low="0" high="31"/> 985bf215546Sopenharmony_ci </reg32> 986bf215546Sopenharmony_ci</domain> 987bf215546Sopenharmony_ci 988bf215546Sopenharmony_ci<domain name="CP_SET_BIN_DATA5" width="32"> 989bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 990bf215546Sopenharmony_ci <!-- equiv to PC_VSTREAM_CONTROL.SIZE on a3xx/a4xx: --> 991bf215546Sopenharmony_ci <bitfield name="VSC_SIZE" low="16" high="21" type="uint"/> 992bf215546Sopenharmony_ci <!-- equiv to PC_VSTREAM_CONTROL.N on a3xx/a4xx: --> 993bf215546Sopenharmony_ci <bitfield name="VSC_N" low="22" high="26" type="uint"/> 994bf215546Sopenharmony_ci </reg32> 995bf215546Sopenharmony_ci <!-- BIN_DATA_ADDR -> VSC_PIPE[p].DATA_ADDRESS --> 996bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 997bf215546Sopenharmony_ci <bitfield name="BIN_DATA_ADDR_LO" low="0" high="31" type="hex"/> 998bf215546Sopenharmony_ci </reg32> 999bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1000bf215546Sopenharmony_ci <bitfield name="BIN_DATA_ADDR_HI" low="0" high="31" type="hex"/> 1001bf215546Sopenharmony_ci </reg32> 1002bf215546Sopenharmony_ci <!-- BIN_SIZE_ADDRESS -> VSC_SIZE_ADDRESS + (p * 4)--> 1003bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1004bf215546Sopenharmony_ci <bitfield name="BIN_SIZE_ADDRESS_LO" low="0" high="31"/> 1005bf215546Sopenharmony_ci </reg32> 1006bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1007bf215546Sopenharmony_ci <bitfield name="BIN_SIZE_ADDRESS_HI" low="0" high="31"/> 1008bf215546Sopenharmony_ci </reg32> 1009bf215546Sopenharmony_ci <!-- new on a6xx, where BIN_DATA_ADDR is the DRAW_STRM: --> 1010bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1011bf215546Sopenharmony_ci <bitfield name="BIN_PRIM_STRM_LO" low="0" high="31"/> 1012bf215546Sopenharmony_ci </reg32> 1013bf215546Sopenharmony_ci <reg32 offset="6" name="6"> 1014bf215546Sopenharmony_ci <bitfield name="BIN_PRIM_STRM_HI" low="0" high="31"/> 1015bf215546Sopenharmony_ci </reg32> 1016bf215546Sopenharmony_ci</domain> 1017bf215546Sopenharmony_ci 1018bf215546Sopenharmony_ci<domain name="CP_SET_BIN_DATA5_OFFSET" width="32"> 1019bf215546Sopenharmony_ci <doc> 1020bf215546Sopenharmony_ci Like CP_SET_BIN_DATA5, but set the pointers as offsets from the 1021bf215546Sopenharmony_ci pointers stored in VSC_PIPE_{DATA,DATA2,SIZE}_ADDRESS. Useful 1022bf215546Sopenharmony_ci for Vulkan where these values aren't known when the command 1023bf215546Sopenharmony_ci stream is recorded. 1024bf215546Sopenharmony_ci </doc> 1025bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1026bf215546Sopenharmony_ci <!-- equiv to PC_VSTREAM_CONTROL.SIZE on a3xx/a4xx: --> 1027bf215546Sopenharmony_ci <bitfield name="VSC_SIZE" low="16" high="21" type="uint"/> 1028bf215546Sopenharmony_ci <!-- equiv to PC_VSTREAM_CONTROL.N on a3xx/a4xx: --> 1029bf215546Sopenharmony_ci <bitfield name="VSC_N" low="22" high="26" type="uint"/> 1030bf215546Sopenharmony_ci </reg32> 1031bf215546Sopenharmony_ci <!-- BIN_DATA_ADDR -> VSC_PIPE[p].DATA_ADDRESS --> 1032bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1033bf215546Sopenharmony_ci <bitfield name="BIN_DATA_OFFSET" low="0" high="31" type="uint"/> 1034bf215546Sopenharmony_ci </reg32> 1035bf215546Sopenharmony_ci <!-- BIN_SIZE_ADDRESS -> VSC_SIZE_ADDRESS + (p * 4)--> 1036bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1037bf215546Sopenharmony_ci <bitfield name="BIN_SIZE_OFFSET" low="0" high="31" type="uint"/> 1038bf215546Sopenharmony_ci </reg32> 1039bf215546Sopenharmony_ci <!-- BIN_DATA2_ADDR -> VSC_PIPE[p].DATA2_ADDRESS --> 1040bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1041bf215546Sopenharmony_ci <bitfield name="BIN_DATA2_OFFSET" low="0" high="31" type="uint"/> 1042bf215546Sopenharmony_ci </reg32> 1043bf215546Sopenharmony_ci</domain> 1044bf215546Sopenharmony_ci 1045bf215546Sopenharmony_ci<domain name="CP_REG_RMW" width="32"> 1046bf215546Sopenharmony_ci <doc> 1047bf215546Sopenharmony_ci Modifies DST_REG using two sources that can either be registers 1048bf215546Sopenharmony_ci or immediates. If SRC1_ADD is set, then do the following: 1049bf215546Sopenharmony_ci 1050bf215546Sopenharmony_ci $dst = (($dst & $src0) rot $rotate) + $src1 1051bf215546Sopenharmony_ci 1052bf215546Sopenharmony_ci Otherwise: 1053bf215546Sopenharmony_ci 1054bf215546Sopenharmony_ci $dst = (($dst & $src0) rot $rotate) | $src1 1055bf215546Sopenharmony_ci 1056bf215546Sopenharmony_ci Here "rot" means rotate left. 1057bf215546Sopenharmony_ci </doc> 1058bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1059bf215546Sopenharmony_ci <bitfield name="DST_REG" low="0" high="17" type="hex"/> 1060bf215546Sopenharmony_ci <bitfield name="ROTATE" low="24" high="28" type="uint"/> 1061bf215546Sopenharmony_ci <bitfield name="SRC1_ADD" pos="29" type="boolean"/> 1062bf215546Sopenharmony_ci <bitfield name="SRC1_IS_REG" pos="30" type="boolean"/> 1063bf215546Sopenharmony_ci <bitfield name="SRC0_IS_REG" pos="31" type="boolean"/> 1064bf215546Sopenharmony_ci </reg32> 1065bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1066bf215546Sopenharmony_ci <bitfield name="SRC0" low="0" high="31" type="uint"/> 1067bf215546Sopenharmony_ci </reg32> 1068bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1069bf215546Sopenharmony_ci <bitfield name="SRC1" low="0" high="31" type="uint"/> 1070bf215546Sopenharmony_ci </reg32> 1071bf215546Sopenharmony_ci</domain> 1072bf215546Sopenharmony_ci 1073bf215546Sopenharmony_ci<domain name="CP_REG_TO_MEM" width="32"> 1074bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1075bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1076bf215546Sopenharmony_ci <!-- number of registers/dwords copied is max(CNT, 1). --> 1077bf215546Sopenharmony_ci <bitfield name="CNT" low="18" high="29" type="uint"/> 1078bf215546Sopenharmony_ci <bitfield name="64B" pos="30" type="boolean"/> 1079bf215546Sopenharmony_ci <bitfield name="ACCUMULATE" pos="31" type="boolean"/> 1080bf215546Sopenharmony_ci </reg32> 1081bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1082bf215546Sopenharmony_ci <bitfield name="DEST" low="0" high="31"/> 1083bf215546Sopenharmony_ci </reg32> 1084bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 1085bf215546Sopenharmony_ci <bitfield name="DEST_HI" low="0" high="31"/> 1086bf215546Sopenharmony_ci </reg32> 1087bf215546Sopenharmony_ci</domain> 1088bf215546Sopenharmony_ci 1089bf215546Sopenharmony_ci<domain name="CP_REG_TO_MEM_OFFSET_REG" width="32"> 1090bf215546Sopenharmony_ci <doc> 1091bf215546Sopenharmony_ci Like CP_REG_TO_MEM, but the memory address to write to can be 1092bf215546Sopenharmony_ci offsetted using either one or two registers or scratch 1093bf215546Sopenharmony_ci registers. 1094bf215546Sopenharmony_ci </doc> 1095bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1096bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1097bf215546Sopenharmony_ci <!-- number of registers/dwords copied is max(CNT, 1). --> 1098bf215546Sopenharmony_ci <bitfield name="CNT" low="18" high="29" type="uint"/> 1099bf215546Sopenharmony_ci <bitfield name="64B" pos="30" type="boolean"/> 1100bf215546Sopenharmony_ci <bitfield name="ACCUMULATE" pos="31" type="boolean"/> 1101bf215546Sopenharmony_ci </reg32> 1102bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1103bf215546Sopenharmony_ci <bitfield name="DEST" low="0" high="31"/> 1104bf215546Sopenharmony_ci </reg32> 1105bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 1106bf215546Sopenharmony_ci <bitfield name="DEST_HI" low="0" high="31"/> 1107bf215546Sopenharmony_ci </reg32> 1108bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1109bf215546Sopenharmony_ci <bitfield name="OFFSET0" low="0" high="17" type="hex"/> 1110bf215546Sopenharmony_ci <bitfield name="OFFSET0_SCRATCH" pos="19" type="boolean"/> 1111bf215546Sopenharmony_ci </reg32> 1112bf215546Sopenharmony_ci <!-- followed by an optional identical OFFSET1 dword --> 1113bf215546Sopenharmony_ci</domain> 1114bf215546Sopenharmony_ci 1115bf215546Sopenharmony_ci<domain name="CP_REG_TO_MEM_OFFSET_MEM" width="32"> 1116bf215546Sopenharmony_ci <doc> 1117bf215546Sopenharmony_ci Like CP_REG_TO_MEM, but the memory address to write to can be 1118bf215546Sopenharmony_ci offsetted using a DWORD in memory. 1119bf215546Sopenharmony_ci </doc> 1120bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1121bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1122bf215546Sopenharmony_ci <!-- number of registers/dwords copied is max(CNT, 1). --> 1123bf215546Sopenharmony_ci <bitfield name="CNT" low="18" high="29" type="uint"/> 1124bf215546Sopenharmony_ci <bitfield name="64B" pos="30" type="boolean"/> 1125bf215546Sopenharmony_ci <bitfield name="ACCUMULATE" pos="31" type="boolean"/> 1126bf215546Sopenharmony_ci </reg32> 1127bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1128bf215546Sopenharmony_ci <bitfield name="DEST" low="0" high="31"/> 1129bf215546Sopenharmony_ci </reg32> 1130bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 1131bf215546Sopenharmony_ci <bitfield name="DEST_HI" low="0" high="31"/> 1132bf215546Sopenharmony_ci </reg32> 1133bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1134bf215546Sopenharmony_ci <bitfield name="OFFSET_LO" low="0" high="31" type="hex"/> 1135bf215546Sopenharmony_ci </reg32> 1136bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1137bf215546Sopenharmony_ci <bitfield name="OFFSET_HI" low="0" high="31" type="hex"/> 1138bf215546Sopenharmony_ci </reg32> 1139bf215546Sopenharmony_ci</domain> 1140bf215546Sopenharmony_ci 1141bf215546Sopenharmony_ci<domain name="CP_MEM_TO_REG" width="32"> 1142bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1143bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1144bf215546Sopenharmony_ci <!-- number of registers/dwords copied is max(CNT, 1). --> 1145bf215546Sopenharmony_ci <bitfield name="CNT" low="19" high="29" type="uint"/> 1146bf215546Sopenharmony_ci <!-- shift each DWORD left by 2 while copying --> 1147bf215546Sopenharmony_ci <bitfield name="SHIFT_BY_2" pos="30" type="boolean"/> 1148bf215546Sopenharmony_ci <!-- does the same thing as CP_MEM_TO_MEM::UNK31 --> 1149bf215546Sopenharmony_ci <bitfield name="UNK31" pos="31" type="boolean"/> 1150bf215546Sopenharmony_ci </reg32> 1151bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1152bf215546Sopenharmony_ci <bitfield name="SRC" low="0" high="31"/> 1153bf215546Sopenharmony_ci </reg32> 1154bf215546Sopenharmony_ci <reg32 offset="2" name="2" varset="chip" variants="A5XX-"> 1155bf215546Sopenharmony_ci <bitfield name="SRC_HI" low="0" high="31"/> 1156bf215546Sopenharmony_ci </reg32> 1157bf215546Sopenharmony_ci</domain> 1158bf215546Sopenharmony_ci 1159bf215546Sopenharmony_ci<domain name="CP_MEM_TO_MEM" width="32"> 1160bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1161bf215546Sopenharmony_ci <!-- 1162bf215546Sopenharmony_ci not sure how many src operands we have, but the low 1163bf215546Sopenharmony_ci bits negate the n'th src argument. 1164bf215546Sopenharmony_ci --> 1165bf215546Sopenharmony_ci <bitfield name="NEG_A" pos="0" type="boolean"/> 1166bf215546Sopenharmony_ci <bitfield name="NEG_B" pos="1" type="boolean"/> 1167bf215546Sopenharmony_ci <bitfield name="NEG_C" pos="2" type="boolean"/> 1168bf215546Sopenharmony_ci 1169bf215546Sopenharmony_ci <!-- if set treat src/dst as 64bit values --> 1170bf215546Sopenharmony_ci <bitfield name="DOUBLE" pos="29" type="boolean"/> 1171bf215546Sopenharmony_ci <!-- execute CP_WAIT_FOR_MEM_WRITES beforehand --> 1172bf215546Sopenharmony_ci <bitfield name="WAIT_FOR_MEM_WRITES" pos="30" type="boolean"/> 1173bf215546Sopenharmony_ci <!-- some other kind of wait --> 1174bf215546Sopenharmony_ci <bitfield name="UNK31" pos="31" type="boolean"/> 1175bf215546Sopenharmony_ci </reg32> 1176bf215546Sopenharmony_ci <!-- 1177bf215546Sopenharmony_ci followed by sequence of addresses.. the first is the 1178bf215546Sopenharmony_ci destination and the rest are N src addresses which are 1179bf215546Sopenharmony_ci summed (after being negated if NEG_x bit set) allowing 1180bf215546Sopenharmony_ci to do things like 'result += end - start' (which turns 1181bf215546Sopenharmony_ci out to be useful for queries and accumulating results 1182bf215546Sopenharmony_ci across multiple tiles) 1183bf215546Sopenharmony_ci --> 1184bf215546Sopenharmony_ci</domain> 1185bf215546Sopenharmony_ci 1186bf215546Sopenharmony_ci<domain name="CP_MEMCPY" width="32"> 1187bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1188bf215546Sopenharmony_ci <bitfield name="DWORDS" low="0" high="31" type="uint"/> 1189bf215546Sopenharmony_ci </reg32> 1190bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1191bf215546Sopenharmony_ci <bitfield name="SRC_LO" low="0" high="31" type="hex"/> 1192bf215546Sopenharmony_ci </reg32> 1193bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1194bf215546Sopenharmony_ci <bitfield name="SRC_HI" low="0" high="31" type="hex"/> 1195bf215546Sopenharmony_ci </reg32> 1196bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1197bf215546Sopenharmony_ci <bitfield name="DST_LO" low="0" high="31" type="hex"/> 1198bf215546Sopenharmony_ci </reg32> 1199bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1200bf215546Sopenharmony_ci <bitfield name="DST_HI" low="0" high="31" type="hex"/> 1201bf215546Sopenharmony_ci </reg32> 1202bf215546Sopenharmony_ci</domain> 1203bf215546Sopenharmony_ci 1204bf215546Sopenharmony_ci<domain name="CP_REG_TO_SCRATCH" width="32"> 1205bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1206bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1207bf215546Sopenharmony_ci <bitfield name="SCRATCH" low="20" high="22" type="uint"/> 1208bf215546Sopenharmony_ci <!-- number of registers/dwords copied is CNT + 1. --> 1209bf215546Sopenharmony_ci <bitfield name="CNT" low="24" high="26" type="uint"/> 1210bf215546Sopenharmony_ci </reg32> 1211bf215546Sopenharmony_ci</domain> 1212bf215546Sopenharmony_ci 1213bf215546Sopenharmony_ci<domain name="CP_SCRATCH_TO_REG" width="32"> 1214bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1215bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17" type="hex"/> 1216bf215546Sopenharmony_ci <!-- note: CP_MEM_TO_REG always sets this when writing to the register --> 1217bf215546Sopenharmony_ci <bitfield name="UNK18" pos="18" type="boolean"/> 1218bf215546Sopenharmony_ci <bitfield name="SCRATCH" low="20" high="22" type="uint"/> 1219bf215546Sopenharmony_ci <!-- number of registers/dwords copied is CNT + 1. --> 1220bf215546Sopenharmony_ci <bitfield name="CNT" low="24" high="26" type="uint"/> 1221bf215546Sopenharmony_ci </reg32> 1222bf215546Sopenharmony_ci</domain> 1223bf215546Sopenharmony_ci 1224bf215546Sopenharmony_ci<domain name="CP_SCRATCH_WRITE" width="32"> 1225bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1226bf215546Sopenharmony_ci <bitfield name="SCRATCH" low="20" high="22" type="uint"/> 1227bf215546Sopenharmony_ci </reg32> 1228bf215546Sopenharmony_ci <!-- followed by one or more DWORDs to write to scratch registers --> 1229bf215546Sopenharmony_ci</domain> 1230bf215546Sopenharmony_ci 1231bf215546Sopenharmony_ci<domain name="CP_MEM_WRITE" width="32"> 1232bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1233bf215546Sopenharmony_ci <bitfield name="ADDR_LO" low="0" high="31"/> 1234bf215546Sopenharmony_ci </reg32> 1235bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1236bf215546Sopenharmony_ci <bitfield name="ADDR_HI" low="0" high="31"/> 1237bf215546Sopenharmony_ci </reg32> 1238bf215546Sopenharmony_ci <!-- followed by the DWORDs to write --> 1239bf215546Sopenharmony_ci</domain> 1240bf215546Sopenharmony_ci 1241bf215546Sopenharmony_ci<enum name="cp_cond_function"> 1242bf215546Sopenharmony_ci <value value="0" name="WRITE_ALWAYS"/> 1243bf215546Sopenharmony_ci <value value="1" name="WRITE_LT"/> 1244bf215546Sopenharmony_ci <value value="2" name="WRITE_LE"/> 1245bf215546Sopenharmony_ci <value value="3" name="WRITE_EQ"/> 1246bf215546Sopenharmony_ci <value value="4" name="WRITE_NE"/> 1247bf215546Sopenharmony_ci <value value="5" name="WRITE_GE"/> 1248bf215546Sopenharmony_ci <value value="6" name="WRITE_GT"/> 1249bf215546Sopenharmony_ci</enum> 1250bf215546Sopenharmony_ci 1251bf215546Sopenharmony_ci<domain name="CP_COND_WRITE" width="32"> 1252bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1253bf215546Sopenharmony_ci <bitfield name="FUNCTION" low="0" high="2" type="cp_cond_function"/> 1254bf215546Sopenharmony_ci <bitfield name="POLL_MEMORY" pos="4" type="boolean"/> 1255bf215546Sopenharmony_ci <bitfield name="WRITE_MEMORY" pos="8" type="boolean"/> 1256bf215546Sopenharmony_ci </reg32> 1257bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1258bf215546Sopenharmony_ci <bitfield name="POLL_ADDR" low="0" high="31" type="hex"/> 1259bf215546Sopenharmony_ci </reg32> 1260bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1261bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31"/> 1262bf215546Sopenharmony_ci </reg32> 1263bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1264bf215546Sopenharmony_ci <bitfield name="MASK" low="0" high="31"/> 1265bf215546Sopenharmony_ci </reg32> 1266bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1267bf215546Sopenharmony_ci <bitfield name="WRITE_ADDR" low="0" high="31" type="hex"/> 1268bf215546Sopenharmony_ci </reg32> 1269bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1270bf215546Sopenharmony_ci <bitfield name="WRITE_DATA" low="0" high="31"/> 1271bf215546Sopenharmony_ci </reg32> 1272bf215546Sopenharmony_ci</domain> 1273bf215546Sopenharmony_ci 1274bf215546Sopenharmony_ci<domain name="CP_COND_WRITE5" width="32"> 1275bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1276bf215546Sopenharmony_ci <bitfield name="FUNCTION" low="0" high="2" type="cp_cond_function"/> 1277bf215546Sopenharmony_ci <bitfield name="SIGNED_COMPARE" pos="3" type="boolean"/> 1278bf215546Sopenharmony_ci <!-- if both POLL_MEMORY and POLL_SCRATCH are false, it polls a register at POLL_ADDR_LO instead. --> 1279bf215546Sopenharmony_ci <bitfield name="POLL_MEMORY" pos="4" type="boolean"/> 1280bf215546Sopenharmony_ci <bitfield name="POLL_SCRATCH" pos="5" type="boolean"/> 1281bf215546Sopenharmony_ci <bitfield name="WRITE_MEMORY" pos="8" type="boolean"/> 1282bf215546Sopenharmony_ci </reg32> 1283bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1284bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_LO" low="0" high="31" type="hex"/> 1285bf215546Sopenharmony_ci </reg32> 1286bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1287bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_HI" low="0" high="31" type="hex"/> 1288bf215546Sopenharmony_ci </reg32> 1289bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1290bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31"/> 1291bf215546Sopenharmony_ci </reg32> 1292bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1293bf215546Sopenharmony_ci <bitfield name="MASK" low="0" high="31"/> 1294bf215546Sopenharmony_ci </reg32> 1295bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1296bf215546Sopenharmony_ci <bitfield name="WRITE_ADDR_LO" low="0" high="31" type="hex"/> 1297bf215546Sopenharmony_ci </reg32> 1298bf215546Sopenharmony_ci <reg32 offset="6" name="6"> 1299bf215546Sopenharmony_ci <bitfield name="WRITE_ADDR_HI" low="0" high="31" type="hex"/> 1300bf215546Sopenharmony_ci </reg32> 1301bf215546Sopenharmony_ci <reg32 offset="7" name="7"> 1302bf215546Sopenharmony_ci <bitfield name="WRITE_DATA" low="0" high="31"/> 1303bf215546Sopenharmony_ci </reg32> 1304bf215546Sopenharmony_ci</domain> 1305bf215546Sopenharmony_ci 1306bf215546Sopenharmony_ci<domain name="CP_WAIT_MEM_GTE" width="32"> 1307bf215546Sopenharmony_ci <doc> 1308bf215546Sopenharmony_ci Wait until a memory value is greater than or equal to the 1309bf215546Sopenharmony_ci reference, using signed comparison. 1310bf215546Sopenharmony_ci </doc> 1311bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1312bf215546Sopenharmony_ci <!-- Reserved for flags, presumably? Unused in FW --> 1313bf215546Sopenharmony_ci <bitfield name="RESERVED" low="0" high="31" type="hex"/> 1314bf215546Sopenharmony_ci </reg32> 1315bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1316bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_LO" low="0" high="31" type="hex"/> 1317bf215546Sopenharmony_ci </reg32> 1318bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1319bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_HI" low="0" high="31" type="hex"/> 1320bf215546Sopenharmony_ci </reg32> 1321bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1322bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31"/> 1323bf215546Sopenharmony_ci </reg32> 1324bf215546Sopenharmony_ci</domain> 1325bf215546Sopenharmony_ci 1326bf215546Sopenharmony_ci<domain name="CP_WAIT_REG_MEM" width="32"> 1327bf215546Sopenharmony_ci <doc> 1328bf215546Sopenharmony_ci This uses the same internal comparison as CP_COND_WRITE, 1329bf215546Sopenharmony_ci but waits until the comparison is true instead. It busy-loops in 1330bf215546Sopenharmony_ci the CP for the given number of cycles before trying again. 1331bf215546Sopenharmony_ci </doc> 1332bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1333bf215546Sopenharmony_ci <bitfield name="FUNCTION" low="0" high="2" type="cp_cond_function"/> 1334bf215546Sopenharmony_ci <bitfield name="SIGNED_COMPARE" pos="3" type="boolean"/> 1335bf215546Sopenharmony_ci <bitfield name="POLL_MEMORY" pos="4" type="boolean"/> 1336bf215546Sopenharmony_ci <bitfield name="POLL_SCRATCH" pos="5" type="boolean"/> 1337bf215546Sopenharmony_ci <bitfield name="WRITE_MEMORY" pos="8" type="boolean"/> 1338bf215546Sopenharmony_ci </reg32> 1339bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1340bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_LO" low="0" high="31" type="hex"/> 1341bf215546Sopenharmony_ci </reg32> 1342bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1343bf215546Sopenharmony_ci <bitfield name="POLL_ADDR_HI" low="0" high="31" type="hex"/> 1344bf215546Sopenharmony_ci </reg32> 1345bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1346bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31"/> 1347bf215546Sopenharmony_ci </reg32> 1348bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1349bf215546Sopenharmony_ci <bitfield name="MASK" low="0" high="31"/> 1350bf215546Sopenharmony_ci </reg32> 1351bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1352bf215546Sopenharmony_ci <bitfield name="DELAY_LOOP_CYCLES" low="0" high="31"/> 1353bf215546Sopenharmony_ci </reg32> 1354bf215546Sopenharmony_ci</domain> 1355bf215546Sopenharmony_ci 1356bf215546Sopenharmony_ci<domain name="CP_WAIT_TWO_REGS" width="32"> 1357bf215546Sopenharmony_ci <doc> 1358bf215546Sopenharmony_ci Waits for REG0 to not be 0 or REG1 to not equal REF 1359bf215546Sopenharmony_ci </doc> 1360bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1361bf215546Sopenharmony_ci <bitfield name="REG0" low="0" high="17" type="hex"/> 1362bf215546Sopenharmony_ci </reg32> 1363bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1364bf215546Sopenharmony_ci <bitfield name="REG1" low="0" high="17" type="hex"/> 1365bf215546Sopenharmony_ci </reg32> 1366bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1367bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31" type="uint"/> 1368bf215546Sopenharmony_ci </reg32> 1369bf215546Sopenharmony_ci</domain> 1370bf215546Sopenharmony_ci 1371bf215546Sopenharmony_ci<domain name="CP_DISPATCH_COMPUTE" width="32"> 1372bf215546Sopenharmony_ci <reg32 offset="0" name="0"/> 1373bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1374bf215546Sopenharmony_ci <bitfield name="X" low="0" high="31"/> 1375bf215546Sopenharmony_ci </reg32> 1376bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1377bf215546Sopenharmony_ci <bitfield name="Y" low="0" high="31"/> 1378bf215546Sopenharmony_ci </reg32> 1379bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1380bf215546Sopenharmony_ci <bitfield name="Z" low="0" high="31"/> 1381bf215546Sopenharmony_ci </reg32> 1382bf215546Sopenharmony_ci</domain> 1383bf215546Sopenharmony_ci 1384bf215546Sopenharmony_ci<domain name="CP_SET_RENDER_MODE" width="32"> 1385bf215546Sopenharmony_ci <enum name="render_mode_cmd"> 1386bf215546Sopenharmony_ci <value value="1" name="BYPASS"/> 1387bf215546Sopenharmony_ci <value value="2" name="BINNING"/> 1388bf215546Sopenharmony_ci <value value="3" name="GMEM"/> 1389bf215546Sopenharmony_ci <value value="5" name="BLIT2D"/> 1390bf215546Sopenharmony_ci <!-- placeholder name.. used when CP_BLIT packets with BLIT_OP_SCALE?? --> 1391bf215546Sopenharmony_ci <value value="7" name="BLIT2DSCALE"/> 1392bf215546Sopenharmony_ci <!-- 8 set before going back to BYPASS exiting 2D --> 1393bf215546Sopenharmony_ci <value value="8" name="END2D"/> 1394bf215546Sopenharmony_ci </enum> 1395bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1396bf215546Sopenharmony_ci <bitfield name="MODE" low="0" high="8" type="render_mode_cmd"/> 1397bf215546Sopenharmony_ci <!-- 1398bf215546Sopenharmony_ci normally 0x1/0x3, sometimes see 0x5/0x8 with unknown registers in 1399bf215546Sopenharmony_ci 0x21xx range.. possibly (at least some) a5xx variants have a 1400bf215546Sopenharmony_ci 2d core? 1401bf215546Sopenharmony_ci --> 1402bf215546Sopenharmony_ci </reg32> 1403bf215546Sopenharmony_ci <!-- I think first buffer is for GPU to save context in case of ctx switch? --> 1404bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1405bf215546Sopenharmony_ci <bitfield name="ADDR_0_LO" low="0" high="31"/> 1406bf215546Sopenharmony_ci </reg32> 1407bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1408bf215546Sopenharmony_ci <bitfield name="ADDR_0_HI" low="0" high="31"/> 1409bf215546Sopenharmony_ci </reg32> 1410bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1411bf215546Sopenharmony_ci <!-- 1412bf215546Sopenharmony_ci set when in GMEM.. maybe indicates GMEM contents need to be 1413bf215546Sopenharmony_ci preserved on ctx switch? 1414bf215546Sopenharmony_ci --> 1415bf215546Sopenharmony_ci <bitfield name="VSC_ENABLE" pos="3" type="boolean"/> 1416bf215546Sopenharmony_ci <bitfield name="GMEM_ENABLE" pos="4" type="boolean"/> 1417bf215546Sopenharmony_ci </reg32> 1418bf215546Sopenharmony_ci <reg32 offset="4" name="4"/> 1419bf215546Sopenharmony_ci <!-- second buffer looks like some cmdstream.. length in dwords: --> 1420bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1421bf215546Sopenharmony_ci <bitfield name="ADDR_1_LEN" low="0" high="31" type="uint"/> 1422bf215546Sopenharmony_ci </reg32> 1423bf215546Sopenharmony_ci <reg32 offset="6" name="6"> 1424bf215546Sopenharmony_ci <bitfield name="ADDR_1_LO" low="0" high="31"/> 1425bf215546Sopenharmony_ci </reg32> 1426bf215546Sopenharmony_ci <reg32 offset="7" name="7"> 1427bf215546Sopenharmony_ci <bitfield name="ADDR_1_HI" low="0" high="31"/> 1428bf215546Sopenharmony_ci </reg32> 1429bf215546Sopenharmony_ci</domain> 1430bf215546Sopenharmony_ci 1431bf215546Sopenharmony_ci<!-- this looks fairly similar to CP_SET_RENDER_MODE minus first dword --> 1432bf215546Sopenharmony_ci<domain name="CP_COMPUTE_CHECKPOINT" width="32"> 1433bf215546Sopenharmony_ci <!-- I think first buffer is for GPU to save context in case of ctx switch? --> 1434bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1435bf215546Sopenharmony_ci <bitfield name="ADDR_0_LO" low="0" high="31"/> 1436bf215546Sopenharmony_ci </reg32> 1437bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1438bf215546Sopenharmony_ci <bitfield name="ADDR_0_HI" low="0" high="31"/> 1439bf215546Sopenharmony_ci </reg32> 1440bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1441bf215546Sopenharmony_ci </reg32> 1442bf215546Sopenharmony_ci <!-- second buffer looks like some cmdstream.. length in dwords: --> 1443bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1444bf215546Sopenharmony_ci <bitfield name="ADDR_1_LEN" low="0" high="31" type="uint"/> 1445bf215546Sopenharmony_ci </reg32> 1446bf215546Sopenharmony_ci <reg32 offset="4" name="4"/> 1447bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1448bf215546Sopenharmony_ci <bitfield name="ADDR_1_LO" low="0" high="31"/> 1449bf215546Sopenharmony_ci </reg32> 1450bf215546Sopenharmony_ci <reg32 offset="6" name="6"> 1451bf215546Sopenharmony_ci <bitfield name="ADDR_1_HI" low="0" high="31"/> 1452bf215546Sopenharmony_ci </reg32> 1453bf215546Sopenharmony_ci <reg32 offset="7" name="7"/> 1454bf215546Sopenharmony_ci</domain> 1455bf215546Sopenharmony_ci 1456bf215546Sopenharmony_ci<domain name="CP_PERFCOUNTER_ACTION" width="32"> 1457bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1458bf215546Sopenharmony_ci </reg32> 1459bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1460bf215546Sopenharmony_ci <bitfield name="ADDR_0_LO" low="0" high="31"/> 1461bf215546Sopenharmony_ci </reg32> 1462bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1463bf215546Sopenharmony_ci <bitfield name="ADDR_0_HI" low="0" high="31"/> 1464bf215546Sopenharmony_ci </reg32> 1465bf215546Sopenharmony_ci</domain> 1466bf215546Sopenharmony_ci 1467bf215546Sopenharmony_ci<domain name="CP_EVENT_WRITE" width="32"> 1468bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1469bf215546Sopenharmony_ci <bitfield name="EVENT" low="0" high="7" type="vgt_event_type"/> 1470bf215546Sopenharmony_ci <!-- when set, write back timestamp instead of value from packet: --> 1471bf215546Sopenharmony_ci <bitfield name="TIMESTAMP" pos="30" type="boolean"/> 1472bf215546Sopenharmony_ci <bitfield name="IRQ" pos="31" type="boolean"/> 1473bf215546Sopenharmony_ci </reg32> 1474bf215546Sopenharmony_ci <!-- 1475bf215546Sopenharmony_ci TODO what is gpuaddr for, seems to be all 0's.. maybe needed for 1476bf215546Sopenharmony_ci context switch? 1477bf215546Sopenharmony_ci --> 1478bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1479bf215546Sopenharmony_ci <bitfield name="ADDR_0_LO" low="0" high="31"/> 1480bf215546Sopenharmony_ci </reg32> 1481bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1482bf215546Sopenharmony_ci <bitfield name="ADDR_0_HI" low="0" high="31"/> 1483bf215546Sopenharmony_ci </reg32> 1484bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1485bf215546Sopenharmony_ci <!-- ??? --> 1486bf215546Sopenharmony_ci </reg32> 1487bf215546Sopenharmony_ci</domain> 1488bf215546Sopenharmony_ci 1489bf215546Sopenharmony_ci<domain name="CP_BLIT" width="32"> 1490bf215546Sopenharmony_ci <enum name="cp_blit_cmd"> 1491bf215546Sopenharmony_ci <value value="0" name="BLIT_OP_FILL"/> 1492bf215546Sopenharmony_ci <value value="1" name="BLIT_OP_COPY"/> 1493bf215546Sopenharmony_ci <value value="3" name="BLIT_OP_SCALE"/> <!-- used for mipmap generation --> 1494bf215546Sopenharmony_ci </enum> 1495bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1496bf215546Sopenharmony_ci <bitfield name="OP" low="0" high="3" type="cp_blit_cmd"/> 1497bf215546Sopenharmony_ci </reg32> 1498bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1499bf215546Sopenharmony_ci <bitfield name="SRC_X1" low="0" high="13" type="uint"/> 1500bf215546Sopenharmony_ci <bitfield name="SRC_Y1" low="16" high="29" type="uint"/> 1501bf215546Sopenharmony_ci </reg32> 1502bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1503bf215546Sopenharmony_ci <bitfield name="SRC_X2" low="0" high="13" type="uint"/> 1504bf215546Sopenharmony_ci <bitfield name="SRC_Y2" low="16" high="29" type="uint"/> 1505bf215546Sopenharmony_ci </reg32> 1506bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1507bf215546Sopenharmony_ci <bitfield name="DST_X1" low="0" high="13" type="uint"/> 1508bf215546Sopenharmony_ci <bitfield name="DST_Y1" low="16" high="29" type="uint"/> 1509bf215546Sopenharmony_ci </reg32> 1510bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1511bf215546Sopenharmony_ci <bitfield name="DST_X2" low="0" high="13" type="uint"/> 1512bf215546Sopenharmony_ci <bitfield name="DST_Y2" low="16" high="29" type="uint"/> 1513bf215546Sopenharmony_ci </reg32> 1514bf215546Sopenharmony_ci</domain> 1515bf215546Sopenharmony_ci 1516bf215546Sopenharmony_ci<domain name="CP_EXEC_CS" width="32"> 1517bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1518bf215546Sopenharmony_ci </reg32> 1519bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1520bf215546Sopenharmony_ci <bitfield name="NGROUPS_X" low="0" high="31" type="uint"/> 1521bf215546Sopenharmony_ci </reg32> 1522bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1523bf215546Sopenharmony_ci <bitfield name="NGROUPS_Y" low="0" high="31" type="uint"/> 1524bf215546Sopenharmony_ci </reg32> 1525bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1526bf215546Sopenharmony_ci <bitfield name="NGROUPS_Z" low="0" high="31" type="uint"/> 1527bf215546Sopenharmony_ci </reg32> 1528bf215546Sopenharmony_ci</domain> 1529bf215546Sopenharmony_ci 1530bf215546Sopenharmony_ci<domain name="CP_EXEC_CS_INDIRECT" width="32" varset="chip" prefix="chip" variants="A4XX-"> 1531bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1532bf215546Sopenharmony_ci </reg32> 1533bf215546Sopenharmony_ci <stripe varset="chip" variants="A4XX"> 1534bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1535bf215546Sopenharmony_ci <bitfield name="ADDR" low="0" high="31"/> 1536bf215546Sopenharmony_ci </reg32> 1537bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1538bf215546Sopenharmony_ci <!-- localsize is value minus one: --> 1539bf215546Sopenharmony_ci <bitfield name="LOCALSIZEX" low="2" high="11" type="uint"/> 1540bf215546Sopenharmony_ci <bitfield name="LOCALSIZEY" low="12" high="21" type="uint"/> 1541bf215546Sopenharmony_ci <bitfield name="LOCALSIZEZ" low="22" high="31" type="uint"/> 1542bf215546Sopenharmony_ci </reg32> 1543bf215546Sopenharmony_ci </stripe> 1544bf215546Sopenharmony_ci <stripe varset="chip" variants="A5XX-"> 1545bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1546bf215546Sopenharmony_ci <bitfield name="ADDR_LO" low="0" high="31"/> 1547bf215546Sopenharmony_ci </reg32> 1548bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1549bf215546Sopenharmony_ci <bitfield name="ADDR_HI" low="0" high="31"/> 1550bf215546Sopenharmony_ci </reg32> 1551bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1552bf215546Sopenharmony_ci <!-- localsize is value minus one: --> 1553bf215546Sopenharmony_ci <bitfield name="LOCALSIZEX" low="2" high="11" type="uint"/> 1554bf215546Sopenharmony_ci <bitfield name="LOCALSIZEY" low="12" high="21" type="uint"/> 1555bf215546Sopenharmony_ci <bitfield name="LOCALSIZEZ" low="22" high="31" type="uint"/> 1556bf215546Sopenharmony_ci </reg32> 1557bf215546Sopenharmony_ci </stripe> 1558bf215546Sopenharmony_ci</domain> 1559bf215546Sopenharmony_ci 1560bf215546Sopenharmony_ci<domain name="CP_SET_MARKER" width="32" varset="chip" prefix="chip" variants="A6XX-"> 1561bf215546Sopenharmony_ci <doc>Tell CP the current operation mode, indicates save and restore procedure</doc> 1562bf215546Sopenharmony_ci <enum name="a6xx_marker"> 1563bf215546Sopenharmony_ci <value value="1" name="RM6_BYPASS"/> 1564bf215546Sopenharmony_ci <value value="2" name="RM6_BINNING"/> 1565bf215546Sopenharmony_ci <value value="4" name="RM6_GMEM"/> 1566bf215546Sopenharmony_ci <value value="5" name="RM6_ENDVIS"/> 1567bf215546Sopenharmony_ci <value value="6" name="RM6_RESOLVE"/> 1568bf215546Sopenharmony_ci <value value="7" name="RM6_YIELD"/> 1569bf215546Sopenharmony_ci <value value="8" name="RM6_COMPUTE"/> 1570bf215546Sopenharmony_ci <value value="0xc" name="RM6_BLIT2DSCALE"/> <!-- no-op (at least on current sqe fw) --> 1571bf215546Sopenharmony_ci 1572bf215546Sopenharmony_ci <!-- 1573bf215546Sopenharmony_ci These values come from a6xx_set_marker() in the 1574bf215546Sopenharmony_ci downstream kernel, and they can only be set by the kernel 1575bf215546Sopenharmony_ci --> 1576bf215546Sopenharmony_ci <value value="0xd" name="RM6_IB1LIST_START"/> 1577bf215546Sopenharmony_ci <value value="0xe" name="RM6_IB1LIST_END"/> 1578bf215546Sopenharmony_ci <!-- IFPC - inter-frame power collapse --> 1579bf215546Sopenharmony_ci <value value="0x100" name="RM6_IFPC_ENABLE"/> 1580bf215546Sopenharmony_ci <value value="0x101" name="RM6_IFPC_DISABLE"/> 1581bf215546Sopenharmony_ci </enum> 1582bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1583bf215546Sopenharmony_ci <!-- 1584bf215546Sopenharmony_ci NOTE: blob driver and some versions of freedreno/turnip set 1585bf215546Sopenharmony_ci b4, which is unused (at least by current sqe fw), but interferes 1586bf215546Sopenharmony_ci with parsing if we extend the size of the bitfield to include 1587bf215546Sopenharmony_ci b8 (only sent by kernel mode driver). Really, the way the 1588bf215546Sopenharmony_ci parsing works in the firmware, only b0-b3 are considered, but 1589bf215546Sopenharmony_ci if b8 is set, the low bits are interpreted differently. To 1590bf215546Sopenharmony_ci model this, without getting confused by spurious b4, this is 1591bf215546Sopenharmony_ci described as two overlapping bitfields: 1592bf215546Sopenharmony_ci --> 1593bf215546Sopenharmony_ci <bitfield name="MODE" low="0" high="8" type="a6xx_marker"/> 1594bf215546Sopenharmony_ci <bitfield name="MARKER" low="0" high="3" type="a6xx_marker"/> 1595bf215546Sopenharmony_ci </reg32> 1596bf215546Sopenharmony_ci</domain> 1597bf215546Sopenharmony_ci 1598bf215546Sopenharmony_ci<domain name="CP_SET_PSEUDO_REG" width="32" varset="chip" prefix="chip" variants="A6XX-"> 1599bf215546Sopenharmony_ci <doc>Set internal CP registers, used to indicate context save data addresses</doc> 1600bf215546Sopenharmony_ci <enum name="pseudo_reg"> 1601bf215546Sopenharmony_ci <value value="0" name="SMMU_INFO"/> 1602bf215546Sopenharmony_ci <value value="1" name="NON_SECURE_SAVE_ADDR"/> 1603bf215546Sopenharmony_ci <value value="2" name="SECURE_SAVE_ADDR"/> 1604bf215546Sopenharmony_ci <value value="3" name="NON_PRIV_SAVE_ADDR"/> 1605bf215546Sopenharmony_ci <value value="4" name="COUNTER"/> 1606bf215546Sopenharmony_ci </enum> 1607bf215546Sopenharmony_ci <array offset="0" stride="3" length="100"> 1608bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1609bf215546Sopenharmony_ci <bitfield name="PSEUDO_REG" low="0" high="2" type="pseudo_reg"/> 1610bf215546Sopenharmony_ci </reg32> 1611bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1612bf215546Sopenharmony_ci <bitfield name="LO" low="0" high="31"/> 1613bf215546Sopenharmony_ci </reg32> 1614bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1615bf215546Sopenharmony_ci <bitfield name="HI" low="0" high="31"/> 1616bf215546Sopenharmony_ci </reg32> 1617bf215546Sopenharmony_ci </array> 1618bf215546Sopenharmony_ci</domain> 1619bf215546Sopenharmony_ci 1620bf215546Sopenharmony_ci<domain name="CP_REG_TEST" width="32" varset="chip" prefix="chip" variants="A6XX-"> 1621bf215546Sopenharmony_ci <doc> 1622bf215546Sopenharmony_ci Tests bit in specified register and sets predicate for CP_COND_REG_EXEC. 1623bf215546Sopenharmony_ci So: 1624bf215546Sopenharmony_ci 1625bf215546Sopenharmony_ci opcode: CP_REG_TEST (39) (2 dwords) 1626bf215546Sopenharmony_ci { REG = 0xc10 | BIT = 0 } 1627bf215546Sopenharmony_ci 0000: 70b90001 00000c10 1628bf215546Sopenharmony_ci opcode: CP_COND_REG_EXEC (47) (3 dwords) 1629bf215546Sopenharmony_ci 0000: 70c70002 10000000 00000004 1630bf215546Sopenharmony_ci opcode: CP_INDIRECT_BUFFER (3f) (4 dwords) 1631bf215546Sopenharmony_ci 1632bf215546Sopenharmony_ci Will execute the CP_INDIRECT_BUFFER only if b0 in the register at 1633bf215546Sopenharmony_ci offset 0x0c10 is 1 1634bf215546Sopenharmony_ci </doc> 1635bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1636bf215546Sopenharmony_ci <!-- the register to test --> 1637bf215546Sopenharmony_ci <bitfield name="REG" low="0" high="17"/> 1638bf215546Sopenharmony_ci <!-- the bit to test --> 1639bf215546Sopenharmony_ci <bitfield name="BIT" low="20" high="24" type="uint"/> 1640bf215546Sopenharmony_ci <!-- execute CP_WAIT_FOR_ME beforehand --> 1641bf215546Sopenharmony_ci <bitfield name="WAIT_FOR_ME" pos="25" type="boolean"/> 1642bf215546Sopenharmony_ci <!-- 1643bf215546Sopenharmony_ci Appears only in: 1644bf215546Sopenharmony_ci opcode: CP_REG_TEST (39) (4 dwords) 1645bf215546Sopenharmony_ci { REG = 0 | BIT = 0 | WAIT_FOR_ME | UNK31 } 1646bf215546Sopenharmony_ci Seem to force CP_REG_TEST to write false 1647bf215546Sopenharmony_ci --> 1648bf215546Sopenharmony_ci <bitfield name="UNK31" pos="31" type="boolean"/> 1649bf215546Sopenharmony_ci </reg32> 1650bf215546Sopenharmony_ci</domain> 1651bf215546Sopenharmony_ci 1652bf215546Sopenharmony_ci<!-- I *think* this existed at least as far back as a4xx --> 1653bf215546Sopenharmony_ci<domain name="CP_COND_REG_EXEC" width="32"> 1654bf215546Sopenharmony_ci <enum name="compare_mode"> 1655bf215546Sopenharmony_ci <!-- use the predicate bit set by CP_REG_TEST --> 1656bf215546Sopenharmony_ci <value value="1" name="PRED_TEST"/> 1657bf215546Sopenharmony_ci <!-- compare two registers directly for equality --> 1658bf215546Sopenharmony_ci <value value="2" name="REG_COMPARE"/> 1659bf215546Sopenharmony_ci <!-- test if certain render modes are set via CP_SET_MARKER --> 1660bf215546Sopenharmony_ci <value value="3" name="RENDER_MODE" varset="chip" variants="A6XX-"/> 1661bf215546Sopenharmony_ci </enum> 1662bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1663bf215546Sopenharmony_ci <bitfield name="REG0" low="0" high="17" type="hex"/> 1664bf215546Sopenharmony_ci 1665bf215546Sopenharmony_ci <!-- 1666bf215546Sopenharmony_ci Blob uses them for vkCmdClearAttachments in gmem mode. Examples: 1667bf215546Sopenharmony_ci opcode: CP_COND_REG_EXEC (47) (3 dwords) 1668bf215546Sopenharmony_ci { REG0 = 0 | MODE = PRED_TEST | 0x140000 } 1669bf215546Sopenharmony_ci opcode: CP_COND_REG_EXEC (47) (3 dwords) 1670bf215546Sopenharmony_ci { REG0 = 0 | MODE = PRED_TEST | 0x100000 } 1671bf215546Sopenharmony_ci --> 1672bf215546Sopenharmony_ci <bitfield name="UNK18" pos="18" varset="chip" variants="A6XX-" type="boolean"/> 1673bf215546Sopenharmony_ci <bitfield name="UNK20" pos="20" varset="chip" variants="A6XX-" type="boolean"/> 1674bf215546Sopenharmony_ci 1675bf215546Sopenharmony_ci <!-- 1676bf215546Sopenharmony_ci Note: these bits have the same meaning, and use the same 1677bf215546Sopenharmony_ci internal mechanism as the bits in CP_SET_DRAW_STATE. 1678bf215546Sopenharmony_ci When RENDER_MODE is selected, they're used as 1679bf215546Sopenharmony_ci a bitmask of which modes pass the test. 1680bf215546Sopenharmony_ci --> 1681bf215546Sopenharmony_ci 1682bf215546Sopenharmony_ci <!-- RM6_BINNING --> 1683bf215546Sopenharmony_ci <bitfield name="BINNING" pos="25" varset="chip" variants="A6XX-" type="boolean"/> 1684bf215546Sopenharmony_ci <!-- all others --> 1685bf215546Sopenharmony_ci <bitfield name="GMEM" pos="26" varset="chip" variants="A6XX-" type="boolean"/> 1686bf215546Sopenharmony_ci <!-- RM6_BYPASS --> 1687bf215546Sopenharmony_ci <bitfield name="SYSMEM" pos="27" varset="chip" variants="A6XX-" type="boolean"/> 1688bf215546Sopenharmony_ci 1689bf215546Sopenharmony_ci <bitfield name="MODE" low="28" high="31" type="compare_mode"/> 1690bf215546Sopenharmony_ci </reg32> 1691bf215546Sopenharmony_ci 1692bf215546Sopenharmony_ci <!-- in REG_COMPARE mode, there's an extra DWORD here with REG1 --> 1693bf215546Sopenharmony_ci 1694bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1695bf215546Sopenharmony_ci <bitfield name="DWORDS" low="0" high="31" type="uint"/> 1696bf215546Sopenharmony_ci </reg32> 1697bf215546Sopenharmony_ci</domain> 1698bf215546Sopenharmony_ci 1699bf215546Sopenharmony_ci<domain name="CP_COND_EXEC" width="32"> 1700bf215546Sopenharmony_ci <doc> 1701bf215546Sopenharmony_ci Executes the following DWORDs of commands if the dword at ADDR0 1702bf215546Sopenharmony_ci is not equal to 0 and the dword at ADDR1 is less than REF 1703bf215546Sopenharmony_ci (signed comparison). 1704bf215546Sopenharmony_ci </doc> 1705bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1706bf215546Sopenharmony_ci <bitfield name="ADDR0_LO" low="0" high="31"/> 1707bf215546Sopenharmony_ci </reg32> 1708bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1709bf215546Sopenharmony_ci <bitfield name="ADDR0_HI" low="0" high="31"/> 1710bf215546Sopenharmony_ci </reg32> 1711bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1712bf215546Sopenharmony_ci <bitfield name="ADDR1_LO" low="0" high="31"/> 1713bf215546Sopenharmony_ci </reg32> 1714bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1715bf215546Sopenharmony_ci <bitfield name="ADDR1_HI" low="0" high="31"/> 1716bf215546Sopenharmony_ci </reg32> 1717bf215546Sopenharmony_ci <reg32 offset="4" name="4"> 1718bf215546Sopenharmony_ci <bitfield name="REF" low="0" high="31"/> 1719bf215546Sopenharmony_ci </reg32> 1720bf215546Sopenharmony_ci <reg32 offset="5" name="5"> 1721bf215546Sopenharmony_ci <bitfield name="DWORDS" low="0" high="31" type="uint"/> 1722bf215546Sopenharmony_ci </reg32> 1723bf215546Sopenharmony_ci</domain> 1724bf215546Sopenharmony_ci 1725bf215546Sopenharmony_ci<domain name="CP_SET_CTXSWITCH_IB" width="32"> 1726bf215546Sopenharmony_ci <doc> 1727bf215546Sopenharmony_ci Used by the userspace driver to set various IB's which are 1728bf215546Sopenharmony_ci executed during context save/restore for handling 1729bf215546Sopenharmony_ci state that isn't restored by the 1730bf215546Sopenharmony_ci context switch routine itself. 1731bf215546Sopenharmony_ci </doc> 1732bf215546Sopenharmony_ci <enum name="ctxswitch_ib"> 1733bf215546Sopenharmony_ci <value name="RESTORE_IB" value="0"> 1734bf215546Sopenharmony_ci <doc>Executed unconditionally when switching back to the context.</doc> 1735bf215546Sopenharmony_ci </value> 1736bf215546Sopenharmony_ci <value name="YIELD_RESTORE_IB" value="1"> 1737bf215546Sopenharmony_ci <doc> 1738bf215546Sopenharmony_ci Executed when switching back after switching 1739bf215546Sopenharmony_ci away during execution of 1740bf215546Sopenharmony_ci a CP_SET_MARKER packet with RM6_YIELD as the 1741bf215546Sopenharmony_ci payload *and* the normal save routine was 1742bf215546Sopenharmony_ci bypassed for a shorter one. I think this is 1743bf215546Sopenharmony_ci connected to the "skipsaverestore" bit set by 1744bf215546Sopenharmony_ci the kernel when preempting. 1745bf215546Sopenharmony_ci </doc> 1746bf215546Sopenharmony_ci </value> 1747bf215546Sopenharmony_ci <value name="SAVE_IB" value="2"> 1748bf215546Sopenharmony_ci <doc> 1749bf215546Sopenharmony_ci Executed when switching away from the context, 1750bf215546Sopenharmony_ci except for context switches initiated via 1751bf215546Sopenharmony_ci CP_YIELD. 1752bf215546Sopenharmony_ci </doc> 1753bf215546Sopenharmony_ci </value> 1754bf215546Sopenharmony_ci <value name="RB_SAVE_IB" value="3"> 1755bf215546Sopenharmony_ci <doc> 1756bf215546Sopenharmony_ci This can only be set by the RB (i.e. the kernel) 1757bf215546Sopenharmony_ci and executes with protected mode off, but 1758bf215546Sopenharmony_ci is otherwise similar to SAVE_IB. 1759bf215546Sopenharmony_ci 1760bf215546Sopenharmony_ci Note, kgsl calls this CP_KMD_AMBLE_TYPE 1761bf215546Sopenharmony_ci </doc> 1762bf215546Sopenharmony_ci </value> 1763bf215546Sopenharmony_ci </enum> 1764bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1765bf215546Sopenharmony_ci <bitfield name="ADDR_LO" low="0" high="31"/> 1766bf215546Sopenharmony_ci </reg32> 1767bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1768bf215546Sopenharmony_ci <bitfield name="ADDR_HI" low="0" high="31"/> 1769bf215546Sopenharmony_ci </reg32> 1770bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1771bf215546Sopenharmony_ci <bitfield name="DWORDS" low="0" high="19" type="uint"/> 1772bf215546Sopenharmony_ci <bitfield name="TYPE" low="20" high="21" type="ctxswitch_ib"/> 1773bf215546Sopenharmony_ci </reg32> 1774bf215546Sopenharmony_ci</domain> 1775bf215546Sopenharmony_ci 1776bf215546Sopenharmony_ci<domain name="CP_REG_WRITE" width="32"> 1777bf215546Sopenharmony_ci <enum name="reg_tracker"> 1778bf215546Sopenharmony_ci <doc> 1779bf215546Sopenharmony_ci Keep shadow copies of these registers and only set them 1780bf215546Sopenharmony_ci when drawing, avoiding redundant writes: 1781bf215546Sopenharmony_ci - VPC_CNTL_0 1782bf215546Sopenharmony_ci - HLSQ_CONTROL_1_REG 1783bf215546Sopenharmony_ci - HLSQ_UNKNOWN_B980 1784bf215546Sopenharmony_ci </doc> 1785bf215546Sopenharmony_ci <value name="TRACK_CNTL_REG" value="0x1"/> 1786bf215546Sopenharmony_ci <doc> 1787bf215546Sopenharmony_ci Track RB_RENDER_CNTL, and insert a WFI in the following 1788bf215546Sopenharmony_ci situation: 1789bf215546Sopenharmony_ci - There is a write that disables binning 1790bf215546Sopenharmony_ci - There was a draw with binning left enabled, but in 1791bf215546Sopenharmony_ci BYPASS mode 1792bf215546Sopenharmony_ci Presumably this is a hang workaround? 1793bf215546Sopenharmony_ci </doc> 1794bf215546Sopenharmony_ci <value name="TRACK_RENDER_CNTL" value="0x2"/> 1795bf215546Sopenharmony_ci <doc> 1796bf215546Sopenharmony_ci Do a mysterious CP_EVENT_WRITE 0x3f when the low bit of 1797bf215546Sopenharmony_ci the data to write is 0. Used by the Vulkan blob with 1798bf215546Sopenharmony_ci PC_MULTIVIEW_CNTL, but this isn't predicated on particular 1799bf215546Sopenharmony_ci register(s) like the others. 1800bf215546Sopenharmony_ci </doc> 1801bf215546Sopenharmony_ci <value name="UNK_EVENT_WRITE" value="0x4"/> 1802bf215546Sopenharmony_ci <doc> 1803bf215546Sopenharmony_ci Tracks GRAS_LRZ_CNTL::GREATER, GRAS_LRZ_CNTL::DIR, and 1804bf215546Sopenharmony_ci GRAS_LRZ_DEPTH_VIEW with previous values, and if one of 1805bf215546Sopenharmony_ci the following is true: 1806bf215546Sopenharmony_ci - GRAS_LRZ_CNTL::GREATER has changed 1807bf215546Sopenharmony_ci - GRAS_LRZ_CNTL::DIR has changed, the old value is not 1808bf215546Sopenharmony_ci CUR_DIR_GE, and the new value is not CUR_DIR_DISABLED 1809bf215546Sopenharmony_ci - GRAS_LRZ_DEPTH_VIEW has changed 1810bf215546Sopenharmony_ci then it does a LRZ_FLUSH with GRAS_LRZ_CNTL::ENABLE 1811bf215546Sopenharmony_ci forced to 1. 1812bf215546Sopenharmony_ci Only exists in a650_sqe.fw. 1813bf215546Sopenharmony_ci </doc> 1814bf215546Sopenharmony_ci <value name="TRACK_LRZ" value="0x8"/> 1815bf215546Sopenharmony_ci </enum> 1816bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1817bf215546Sopenharmony_ci <bitfield name="TRACKER" low="0" high="3" type="reg_tracker"/> 1818bf215546Sopenharmony_ci </reg32> 1819bf215546Sopenharmony_ci</domain> 1820bf215546Sopenharmony_ci 1821bf215546Sopenharmony_ci<domain name="CP_SMMU_TABLE_UPDATE" width="32"> 1822bf215546Sopenharmony_ci <doc> 1823bf215546Sopenharmony_ci Note that the SMMU's definition of TTBRn can take different forms 1824bf215546Sopenharmony_ci depending on the pgtable format. But a5xx+ only uses aarch64 1825bf215546Sopenharmony_ci format. 1826bf215546Sopenharmony_ci </doc> 1827bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1828bf215546Sopenharmony_ci <bitfield name="TTBR0_LO" low="0" high="31"/> 1829bf215546Sopenharmony_ci </reg32> 1830bf215546Sopenharmony_ci <reg32 offset="1" name="1"> 1831bf215546Sopenharmony_ci <bitfield name="TTBR0_HI" low="0" high="15"/> 1832bf215546Sopenharmony_ci <bitfield name="ASID" low="16" high="31"/> 1833bf215546Sopenharmony_ci </reg32> 1834bf215546Sopenharmony_ci <reg32 offset="2" name="2"> 1835bf215546Sopenharmony_ci <doc>Unused, does not apply to aarch64 pgtable format</doc> 1836bf215546Sopenharmony_ci <bitfield name="CONTEXTIDR" low="0" high="31"/> 1837bf215546Sopenharmony_ci </reg32> 1838bf215546Sopenharmony_ci <reg32 offset="3" name="3"> 1839bf215546Sopenharmony_ci <bitfield name="CONTEXTBANK" low="0" high="31"/> 1840bf215546Sopenharmony_ci </reg32> 1841bf215546Sopenharmony_ci</domain> 1842bf215546Sopenharmony_ci 1843bf215546Sopenharmony_ci<domain name="CP_START_BIN" width="32"> 1844bf215546Sopenharmony_ci <reg32 offset="0" name="BIN_COUNT" type="uint"/> 1845bf215546Sopenharmony_ci <reg64 offset="1" name="PREFIX_ADDR" type="address"/> 1846bf215546Sopenharmony_ci <reg32 offset="3" name="PREFIX_DWORDS"> 1847bf215546Sopenharmony_ci <doc> 1848bf215546Sopenharmony_ci Size of prefix for each bin. For each bin index i, the 1849bf215546Sopenharmony_ci prefix commands at PREFIX_ADDR + i * PREFIX_DWORDS are 1850bf215546Sopenharmony_ci executed in an IB2 before the IB1 commands following 1851bf215546Sopenharmony_ci this packet. 1852bf215546Sopenharmony_ci </doc> 1853bf215546Sopenharmony_ci </reg32> 1854bf215546Sopenharmony_ci <reg32 offset="4" name="BODY_DWORDS"> 1855bf215546Sopenharmony_ci <doc>Number of dwords after this packet until CP_END_BIN</doc> 1856bf215546Sopenharmony_ci </reg32> 1857bf215546Sopenharmony_ci</domain> 1858bf215546Sopenharmony_ci 1859bf215546Sopenharmony_ci<domain name="CP_THREAD_CONTROL" width="32"> 1860bf215546Sopenharmony_ci <enum name="cp_thread"> 1861bf215546Sopenharmony_ci <value name="CP_SET_THREAD_BR" value="1"/> 1862bf215546Sopenharmony_ci <value name="CP_SET_THREAD_BV" value="2"/> 1863bf215546Sopenharmony_ci <value name="CP_SET_THREAD_BOTH" value="3"/> 1864bf215546Sopenharmony_ci </enum> 1865bf215546Sopenharmony_ci <reg32 offset="0" name="0"> 1866bf215546Sopenharmony_ci <bitfield low="0" high="1" name="THREAD" type="cp_thread"/> 1867bf215546Sopenharmony_ci <bitfield pos="27" name="CONCURRENT_BIN_DISABLE" type="boolean"/> 1868bf215546Sopenharmony_ci <bitfield pos="31" name="SYNC_THREADS" type="boolean"/> 1869bf215546Sopenharmony_ci </reg32> 1870bf215546Sopenharmony_ci</domain> 1871bf215546Sopenharmony_ci 1872bf215546Sopenharmony_ci</database> 1873bf215546Sopenharmony_ci 1874