summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Abbott <cwabbott0@gmail.com>2024-07-11 07:48:58 -0400
committerMarge Bot <emma+marge@anholt.net>2024-09-02 18:36:47 +0000
commit46ad5a01a89959726769b869b1e5019813c5e48d (patch)
tree3499cbac2d8262e4ab998c02dd6348ae9b48a508
parent5be6f3b089c78852d813dbd6f7db2db0223862c4 (diff)
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>
-rw-r--r--src/freedreno/.gitlab-ci/reference/afuc_test.asm2
-rw-r--r--src/freedreno/.gitlab-ci/reference/afuc_test_a7xx.asm6
-rw-r--r--src/freedreno/.gitlab-ci/traces/afuc_test.asm2
-rw-r--r--src/freedreno/.gitlab-ci/traces/afuc_test_a7xx.asm6
-rw-r--r--src/freedreno/registers/adreno/adreno_pm4.xml35
5 files changed, 23 insertions, 28 deletions
diff --git a/src/freedreno/.gitlab-ci/reference/afuc_test.asm b/src/freedreno/.gitlab-ci/reference/afuc_test.asm
index fc2680ee3e7..6364499fe9c 100644
--- a/src/freedreno/.gitlab-ci/reference/afuc_test.asm
+++ b/src/freedreno/.gitlab-ci/reference/afuc_test.asm
@@ -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:
diff --git a/src/freedreno/.gitlab-ci/reference/afuc_test_a7xx.asm b/src/freedreno/.gitlab-ci/reference/afuc_test_a7xx.asm
index ee07fae703a..294bccf55b7 100644
--- a/src/freedreno/.gitlab-ci/reference/afuc_test_a7xx.asm
+++ b/src/freedreno/.gitlab-ci/reference/afuc_test_a7xx.asm
@@ -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:
diff --git a/src/freedreno/.gitlab-ci/traces/afuc_test.asm b/src/freedreno/.gitlab-ci/traces/afuc_test.asm
index 1463c548995..45e836ad074 100644
--- a/src/freedreno/.gitlab-ci/traces/afuc_test.asm
+++ b/src/freedreno/.gitlab-ci/traces/afuc_test.asm
@@ -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:
diff --git a/src/freedreno/.gitlab-ci/traces/afuc_test_a7xx.asm b/src/freedreno/.gitlab-ci/traces/afuc_test_a7xx.asm
index 0bc968ec41f..811f062111c 100644
--- a/src/freedreno/.gitlab-ci/traces/afuc_test_a7xx.asm
+++ b/src/freedreno/.gitlab-ci/traces/afuc_test_a7xx.asm
@@ -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:
diff --git a/src/freedreno/registers/adreno/adreno_pm4.xml b/src/freedreno/registers/adreno/adreno_pm4.xml
index 21ad4698b96..33740275e42 100644
--- a/src/freedreno/registers/adreno/adreno_pm4.xml
+++ b/src/freedreno/registers/adreno/adreno_pm4.xml
@@ -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>