ac: Clarify SDMA opcode defines.
authorTimur Kristóf <timur.kristof@gmail.com>
Tue, 26 Sep 2023 09:53:00 +0000 (11:53 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 18 Oct 2023 16:29:01 +0000 (16:29 +0000)
Make the naming of these defines consistent with others.
And add a few new opcodes and related definitions.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25769>

src/amd/common/sid.h

index e82a227..03d4793 100644 (file)
 #define SDMA_WRITE_SUB_OPCODE_LINEAR               0x0
 #define SDMA_WRITE_SUB_OPCODE_TILED                0x1
 #define CIK_SDMA_OPCODE_INDIRECT_BUFFER            0x4
-#define CIK_SDMA_PACKET_FENCE                      0x5
-#define CIK_SDMA_PACKET_TRAP                       0x6
-#define CIK_SDMA_PACKET_SEMAPHORE                  0x7
-#define CIK_SDMA_PACKET_CONSTANT_FILL              0xb
+#define CIK_SDMA_OPCODE_FENCE                      0x5
+#define SDMA_FENCE_MTYPE_UC                        0x3
+#define CIK_SDMA_OPCODE_TRAP                       0x6
+#define CIK_SDMA_OPCODE_SEMAPHORE                  0x7
+#define CIK_SDMA_OPCODE_POLL_REGMEM                0x8
+#define SDMA_POLL_INTERVAL_160_CLK                 0xa
+#define SDMA_POLL_RETRY_INDEFINITELY               0xfff
+#define CIK_SDMA_OPCODE_CONSTANT_FILL              0xb
 #define CIK_SDMA_OPCODE_TIMESTAMP                  0xd
 #define SDMA_TS_SUB_OPCODE_SET_LOCAL_TIMESTAMP     0x0
 #define SDMA_TS_SUB_OPCODE_GET_LOCAL_TIMESTAMP     0x1
 #define SDMA_TS_SUB_OPCODE_GET_GLOBAL_TIMESTAMP    0x2
-#define CIK_SDMA_PACKET_SRBM_WRITE                 0xe
+#define CIK_SDMA_OPCODE_SRBM_WRITE                 0xe
 /* There is apparently an undocumented HW limitation that
    prevents the HW from copying the last 255 bytes of (1 << 22) - 1 */
 #define CIK_SDMA_COPY_MAX_SIZE    0x3fff00   /* almost 4 MB*/