mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
freedreno/a6xx: Remove old reg builder macros
Now that there use has been replaced by new cs builders, remove the old thing. Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36589>
This commit is contained in:
parent
2bff78dcab
commit
668a6030fa
1 changed files with 0 additions and 125 deletions
|
|
@ -569,129 +569,4 @@ private:
|
|||
unsigned off_ = 0;
|
||||
};
|
||||
|
||||
#define __ONE_REG(ring, i, ...) \
|
||||
do { \
|
||||
const struct fd_reg_pair __regs[] = {__VA_ARGS__}; \
|
||||
/* NOTE: allow __regs[0].reg==0, this happens in OUT_PKT() */ \
|
||||
if (i < ARRAY_SIZE(__regs) && (i == 0 || __regs[i].reg > 0)) { \
|
||||
__assert_eq(__regs[0].reg + i, __regs[i].reg); \
|
||||
if (__regs[i].bo) { \
|
||||
uint64_t *__p64 = (uint64_t *)__p; \
|
||||
*__p64 = __reg_iova(&__regs[i]) | __regs[i].value; \
|
||||
__p += 2; \
|
||||
fd_ringbuffer_assert_attached(ring, __regs[i].bo); \
|
||||
} else { \
|
||||
*__p++ = __regs[i].value; \
|
||||
if (__regs[i].is_address) \
|
||||
*__p++ = __regs[i].value >> 32; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define OUT_REG(ring, ...) \
|
||||
do { \
|
||||
const struct fd_reg_pair __regs[] = {__VA_ARGS__}; \
|
||||
unsigned count = ARRAY_SIZE(__regs); \
|
||||
\
|
||||
STATIC_ASSERT(ARRAY_SIZE(__regs) > 0); \
|
||||
STATIC_ASSERT(ARRAY_SIZE(__regs) <= 16); \
|
||||
\
|
||||
BEGIN_RING(ring, count + 1); \
|
||||
uint32_t *__p = ring->cur; \
|
||||
*__p++ = pm4_pkt4_hdr((uint16_t)__regs[0].reg, (uint16_t)count); \
|
||||
\
|
||||
__ONE_REG(ring, 0, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 1, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 2, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 3, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 4, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 5, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 6, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 7, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 8, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 9, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 10, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 11, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 12, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 13, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 14, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 15, __VA_ARGS__); \
|
||||
ring->cur = __p; \
|
||||
} while (0)
|
||||
|
||||
#define OUT_PKT(ring, opcode, ...) \
|
||||
do { \
|
||||
const struct fd_reg_pair __regs[] = {__VA_ARGS__}; \
|
||||
unsigned count = ARRAY_SIZE(__regs); \
|
||||
\
|
||||
STATIC_ASSERT(ARRAY_SIZE(__regs) <= 16); \
|
||||
\
|
||||
BEGIN_RING(ring, count + 1); \
|
||||
uint32_t *__p = ring->cur; \
|
||||
*__p++ = pm4_pkt7_hdr(opcode, count); \
|
||||
\
|
||||
__ONE_REG(ring, 0, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 1, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 2, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 3, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 4, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 5, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 6, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 7, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 8, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 9, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 10, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 11, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 12, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 13, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 14, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 15, __VA_ARGS__); \
|
||||
ring->cur = __p; \
|
||||
} while (0)
|
||||
|
||||
/* similar to OUT_PKT() but appends specified # of dwords
|
||||
* copied for buf to the end of the packet (ie. for use-
|
||||
* cases like CP_LOAD_STATE)
|
||||
*/
|
||||
#define OUT_PKTBUF(ring, opcode, dwords, sizedwords, ...) \
|
||||
do { \
|
||||
const struct fd_reg_pair __regs[] = {__VA_ARGS__}; \
|
||||
unsigned count = ARRAY_SIZE(__regs); \
|
||||
\
|
||||
STATIC_ASSERT(ARRAY_SIZE(__regs) <= 16); \
|
||||
count += sizedwords; \
|
||||
\
|
||||
BEGIN_RING(ring, count + 1); \
|
||||
uint32_t *__p = ring->cur; \
|
||||
*__p++ = pm4_pkt7_hdr(opcode, count); \
|
||||
\
|
||||
__ONE_REG(ring, 0, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 1, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 2, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 3, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 4, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 5, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 6, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 7, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 8, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 9, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 10, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 11, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 12, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 13, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 14, __VA_ARGS__); \
|
||||
__ONE_REG(ring, 15, __VA_ARGS__); \
|
||||
memcpy(__p, dwords, 4 * sizedwords); \
|
||||
__p += sizedwords; \
|
||||
ring->cur = __p; \
|
||||
} while (0)
|
||||
|
||||
#define OUT_BUF(ring, dwords, sizedwords) \
|
||||
do { \
|
||||
uint32_t *__p = ring->cur; \
|
||||
memcpy(__p, dwords, 4 * sizedwords); \
|
||||
__p += sizedwords; \
|
||||
ring->cur = __p; \
|
||||
} while (0)
|
||||
|
||||
#endif /* FD6_PACK_H */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue