freedreno/regs: Document a7xx CP_FIXED_STRIDE_DRAW_TABLE
Executes an array of fixed-size command buffers where each buffer is assumed to have one draw call, skipping buffers with non-visible draw calls. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23881>
This commit is contained in:
@@ -2381,6 +2381,45 @@ cp_start_bin(uint32_t *dwords, uint32_t sizedwords, int level)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cp_fixed_stride_draw_table(uint32_t *dwords, uint32_t sizedwords, int level)
|
||||
{
|
||||
uint64_t ibaddr;
|
||||
uint32_t ibsize;
|
||||
uint32_t loopcount;
|
||||
uint32_t *ptr = NULL;
|
||||
|
||||
loopcount = dwords[3];
|
||||
ibaddr = dwords[0];
|
||||
ibaddr |= ((uint64_t)dwords[1]) << 32;
|
||||
ibsize = dwords[2] >> 20;
|
||||
|
||||
/* map gpuaddr back to hostptr: */
|
||||
ptr = hostptr(ibaddr);
|
||||
|
||||
if (ptr) {
|
||||
/* If the GPU hung within the target IB, the trigger point will be
|
||||
* just after the current CP_START_BIN. Because the IB is
|
||||
* executed but never returns. Account for this by checking if
|
||||
* the IB returned:
|
||||
*/
|
||||
highlight_gpuaddr(gpuaddr(&dwords[5]));
|
||||
|
||||
ib++;
|
||||
for (uint32_t i = 0; i < loopcount; i++) {
|
||||
ibs[ib].base = ibaddr;
|
||||
ibs[ib].size = ibsize;
|
||||
printl(3, "%sdraw %u\n", levels[level], i);
|
||||
dump_commands(ptr, ibsize, level);
|
||||
ibaddr += ibsize;
|
||||
ptr += ibsize;
|
||||
}
|
||||
ib--;
|
||||
} else {
|
||||
fprintf(stderr, "could not find: %016" PRIx64 " (%d)\n", ibaddr, ibsize);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
cp_wfi(uint32_t *dwords, uint32_t sizedwords, int level)
|
||||
{
|
||||
@@ -2894,6 +2933,8 @@ static const struct type3_op {
|
||||
|
||||
CP(START_BIN, cp_start_bin),
|
||||
|
||||
CP(FIXED_STRIDE_DRAW_TABLE, cp_fixed_stride_draw_table),
|
||||
|
||||
/* for a7xx */
|
||||
CP(THREAD_CONTROL, cp_set_thread_control),
|
||||
CP(CONTEXT_REG_BUNCH2, cp_context_reg_bunch2),
|
||||
|
@@ -625,6 +625,13 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
|
||||
<!-- similar to CP_CONTEXT_REG_BUNCH, but discards first two dwords?? -->
|
||||
<value name="CP_CONTEXT_REG_BUNCH2" value="0x5d" variants="A7XX-"/>
|
||||
<value name="CP_UNK49" value="0x49" variants="A7XX-"/> <!-- payload 4 dwords, last two address of something -->
|
||||
|
||||
<doc>
|
||||
Executes an array of fixed-size command buffers where each
|
||||
buffer is assumed to have one draw call, skipping buffers with
|
||||
non-visible draw calls.
|
||||
</doc>
|
||||
<value name="CP_FIXED_STRIDE_DRAW_TABLE" value="0x7f" variants="A7XX-"/>
|
||||
</enum>
|
||||
|
||||
|
||||
@@ -1981,5 +1988,17 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
|
||||
</reg32>
|
||||
</domain>
|
||||
|
||||
<domain name="CP_FIXED_STRIDE_DRAW_TABLE" width="32">
|
||||
<reg64 offset="0" name="IB_BASE"/>
|
||||
<reg32 offset="2" name="2">
|
||||
<!-- STRIDE * COUNT -->
|
||||
<bitfield name="IB_SIZE" low="0" high="11"/>
|
||||
<bitfield name="STRIDE" low="20" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="3" name="3">
|
||||
<bitfield name="COUNT" low="0" high="31"/>
|
||||
</reg32>
|
||||
</domain>
|
||||
|
||||
</database>
|
||||
|
||||
|
Reference in New Issue
Block a user