freedreno: Rename CP_SET_CTXSWITCH_IB to CP_SET_AMBLE

To match kgsl. Also make KMD_AMBLE_TYPE match the kgsl name, and invent
some names for the other types to be consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30942>
This commit is contained in:
Connor Abbott
2024-07-11 07:48:58 -04:00
committed by Marge Bot
parent 5be6f3b089
commit 46ad5a01a8
5 changed files with 23 additions and 28 deletions

View File

@@ -210,8 +210,8 @@ CP_REG_WRITE:
CP_REG_WR_NO_CTXT:
CP_RUN_OPENCL:
CP_SCRATCH_TO_REG:
CP_SET_AMBLE:
CP_SET_BIN_DATA5_OFFSET:
CP_SET_CTXSWITCH_IB:
CP_SET_DRAW_INIT_FLAGS:
CP_SET_MARKER:
CP_SET_MODE:

View File

@@ -244,8 +244,8 @@ CP_RESET_CONTEXT_STATE:
CP_RESOURCE_LIST:
CP_RUN_OPENCL:
CP_SCRATCH_TO_REG:
CP_SET_AMBLE:
CP_SET_BIN_DATA5_OFFSET:
CP_SET_CTXSWITCH_IB:
CP_SET_DRAW_INIT_FLAGS:
CP_SET_MARKER:
CP_SET_MODE:
@@ -410,9 +410,9 @@ CP_RESET_CONTEXT_STATE:
CP_RESOURCE_LIST:
CP_RUN_OPENCL:
CP_SCRATCH_TO_REG:
CP_SET_AMBLE:
CP_SET_BIN_DATA5:
CP_SET_BIN_DATA5_OFFSET:
CP_SET_CTXSWITCH_IB:
CP_SET_DRAW_INIT_FLAGS:
CP_SET_DRAW_STATE:
CP_SET_MARKER:
@@ -573,9 +573,9 @@ CP_RESET_CONTEXT_STATE:
CP_RESOURCE_LIST:
CP_RUN_OPENCL:
CP_SCRATCH_TO_REG:
CP_SET_AMBLE:
CP_SET_BIN_DATA5:
CP_SET_BIN_DATA5_OFFSET:
CP_SET_CTXSWITCH_IB:
CP_SET_DRAW_INIT_FLAGS:
CP_SET_DRAW_STATE:
CP_SET_MARKER:

View File

@@ -292,7 +292,7 @@ CP_END_BIN:
CP_WAIT_REG_EQ:
CP_SMMU_TABLE_UPDATE:
UNKN84:
CP_SET_CTXSWITCH_IB:
CP_SET_AMBLE:
CP_SET_PSEUDO_REG:
CP_INDIRECT_BUFFER_CHAIN:
CP_EVENT_WRITE_SHD:

View File

@@ -328,7 +328,7 @@ CP_END_BIN:
CP_WAIT_REG_EQ:
CP_SMMU_TABLE_UPDATE:
UNKN84:
CP_SET_CTXSWITCH_IB:
CP_SET_AMBLE:
CP_SET_PSEUDO_REG:
CP_INDIRECT_BUFFER_CHAIN:
CP_EVENT_WRITE_SHD:
@@ -506,7 +506,7 @@ CP_END_BIN:
CP_WAIT_REG_EQ:
CP_SMMU_TABLE_UPDATE:
UNKN84:
CP_SET_CTXSWITCH_IB:
CP_SET_AMBLE:
CP_SET_PSEUDO_REG:
CP_INDIRECT_BUFFER_CHAIN:
CP_EVENT_WRITE_SHD:
@@ -674,7 +674,7 @@ CP_END_BIN:
CP_WAIT_REG_EQ:
CP_SMMU_TABLE_UPDATE:
UNKN84:
CP_SET_CTXSWITCH_IB:
CP_SET_AMBLE:
CP_SET_PSEUDO_REG:
CP_INDIRECT_BUFFER_CHAIN:
CP_EVENT_WRITE_SHD:

View File

@@ -588,8 +588,7 @@ xsi:schemaLocation="https://gitlab.freedesktop.org/freedreno/ rules-fd.xsd">
and forcibly switch to the indicated context.
</doc>
<value name="CP_CONTEXT_SWITCH" value="0x54" variants="A6XX"/>
<!-- Note, kgsl calls this CP_SET_AMBLE: -->
<value name="CP_SET_CTXSWITCH_IB" value="0x55" variants="A6XX-"/>
<value name="CP_SET_AMBLE" value="0x55" variants="A6XX-"/>
<!--
Seems to always have the payload:
@@ -2018,42 +2017,38 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
</reg32>
</domain>
<domain name="CP_SET_CTXSWITCH_IB" width="32">
<domain name="CP_SET_AMBLE" width="32">
<doc>
Used by the userspace driver to set various IB's which are
executed during context save/restore for handling
state that isn't restored by the
context switch routine itself.
Used by the userspace and kernel drivers to set various IB's
which are executed during context save/restore for handling
state that isn't restored by the context switch routine itself.
</doc>
<enum name="ctxswitch_ib">
<value name="RESTORE_IB" value="0">
<enum name="amble_type">
<value name="PREAMBLE_AMBLE_TYPE" value="0">
<doc>Executed unconditionally when switching back to the context.</doc>
</value>
<value name="YIELD_RESTORE_IB" value="1">
<value name="BIN_PREAMBLE_AMBLE_TYPE" value="1">
<doc>
Executed when switching back after switching
away during execution of
a CP_SET_MARKER packet with RM6_YIELD as the
payload *and* the normal save routine was
bypassed for a shorter one. I think this is
connected to the "skipsaverestore" bit set by
the kernel when preempting.
payload *and* skipsaverestore is set. This is
expected to restore static register values not
saved when skipsaverestore is set.
</doc>
</value>
<value name="SAVE_IB" value="2">
<value name="POSTAMBLE_AMBLE_TYPE" value="2">
<doc>
Executed when switching away from the context,
except for context switches initiated via
CP_YIELD.
</doc>
</value>
<value name="RB_SAVE_IB" value="3">
<value name="KMD_AMBLE_TYPE" value="3">
<doc>
This can only be set by the RB (i.e. the kernel)
and executes with protected mode off, but
is otherwise similar to SAVE_IB.
Note, kgsl calls this CP_KMD_AMBLE_TYPE
is otherwise similar to POSTAMBLE_AMBLE_TYPE.
</doc>
</value>
</enum>
@@ -2065,7 +2060,7 @@ opcode: CP_LOAD_STATE4 (30) (4 dwords)
</reg32>
<reg32 offset="2" name="2">
<bitfield name="DWORDS" low="0" high="19" type="uint"/>
<bitfield name="TYPE" low="20" high="21" type="ctxswitch_ib"/>
<bitfield name="TYPE" low="20" high="21" type="amble_type"/>
</reg32>
</domain>