mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 01:50:10 +01:00
freedreno/registers: Fix definition of CP_COND_EXEC
The "REF" comparision is a timestamp comparision with rollover. Our current use of CP_COND_EXEC is still fine, but we should be more clear about the comparision operation. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38755>
This commit is contained in:
parent
36ba2672ca
commit
6b3f115c68
2 changed files with 15 additions and 23 deletions
|
|
@ -2053,28 +2053,20 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
|
|||
|
||||
<domain name="CP_COND_EXEC" width="32">
|
||||
<doc>
|
||||
Executes the following DWORDs of commands if the dword at ADDR0
|
||||
is not equal to 0 and the dword at ADDR1 is less than REF
|
||||
(signed comparison).
|
||||
Executes the following DWORDs of commands if the dword
|
||||
at BOOL_ADDR is not equal to 0 and the the timestamp
|
||||
value ACTIVE_TIMESTAMP is ahead of the value fetched
|
||||
from TIMESTAMP_ADDR.
|
||||
|
||||
The timestamp comparision is an unsigned compare with
|
||||
wraparound, ie:
|
||||
|
||||
(ACTIVE_TIMESTAMP - *TIMESTAMP_ADDR) < 0x80000000
|
||||
</doc>
|
||||
<reg32 offset="0" name="0">
|
||||
<bitfield name="ADDR0_LO" low="0" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="1" name="1">
|
||||
<bitfield name="ADDR0_HI" low="0" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="2" name="2">
|
||||
<bitfield name="ADDR1_LO" low="0" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="3" name="3">
|
||||
<bitfield name="ADDR1_HI" low="0" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="4" name="4">
|
||||
<bitfield name="REF" low="0" high="31"/>
|
||||
</reg32>
|
||||
<reg32 offset="5" name="5">
|
||||
<bitfield name="DWORDS" low="0" high="31" type="uint"/>
|
||||
</reg32>
|
||||
<reg64 offset="0" name="BOOL_ADDR" type="address"/>
|
||||
<reg64 offset="2" name="TIMESTAMP_ADDR" type="address"/>
|
||||
<reg32 offset="4" name="ACTIVE_TIMESTAMP"/>
|
||||
<reg32 offset="5" name="DWORDS"/>
|
||||
</domain>
|
||||
|
||||
<domain name="CP_SET_AMBLE" width="32">
|
||||
|
|
|
|||
|
|
@ -840,7 +840,7 @@ emit_copy_query_pool_results(struct tu_cmd_buffer *cmdbuf,
|
|||
tu_cs_emit_pkt7(cs, CP_COND_EXEC, 6);
|
||||
tu_cs_emit_qw(cs, available_iova);
|
||||
tu_cs_emit_qw(cs, available_iova);
|
||||
tu_cs_emit(cs, CP_COND_EXEC_4_REF(0x2));
|
||||
tu_cs_emit(cs, CP_COND_EXEC_ACTIVE_TIMESTAMP(0x2).reg);
|
||||
tu_cs_emit(cs, 6); /* Cond execute the next 6 DWORDS */
|
||||
|
||||
/* Start of conditional execution */
|
||||
|
|
@ -1579,7 +1579,7 @@ emit_stop_primitive_ctrs(struct tu_cmd_buffer *cmdbuf,
|
|||
tu_cs_emit_pkt7(cs, CP_COND_EXEC, 6);
|
||||
tu_cs_emit_qw(cs, global_iova(cmdbuf, vtx_stats_query_not_running));
|
||||
tu_cs_emit_qw(cs, global_iova(cmdbuf, vtx_stats_query_not_running));
|
||||
tu_cs_emit(cs, CP_COND_EXEC_4_REF(0x2));
|
||||
tu_cs_emit(cs, CP_COND_EXEC_ACTIVE_TIMESTAMP(0x2).reg);
|
||||
tu_cs_emit(cs, 2); /* Cond execute the next 2 DWORDS */
|
||||
|
||||
tu_emit_event_write<CHIP>(cmdbuf, cs, FD_STOP_PRIMITIVE_CTRS);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue