freedreno: Extra casting to make C++ happy

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22646>
This commit is contained in:
Rob Clark 2023-04-23 07:54:54 -07:00 committed by Marge Bot
parent 7f99cbf25e
commit 827363f886
2 changed files with 4 additions and 4 deletions

View file

@ -93,7 +93,7 @@ __reg_iova(const struct fd_reg_pair *reg)
\
BEGIN_RING(ring, count + 1); \
uint32_t *__p = ring->cur; \
*__p++ = pm4_pkt4_hdr(__regs[0].reg, count); \
*__p++ = pm4_pkt4_hdr((uint16_t)__regs[0].reg, (uint16_t)count); \
\
__ONE_REG(0, __VA_ARGS__); \
__ONE_REG(1, __VA_ARGS__); \

View file

@ -375,14 +375,14 @@ static inline void
OUT_PKT4(struct fd_ringbuffer *ring, uint16_t regindx, uint16_t cnt)
{
BEGIN_RING(ring, cnt + 1);
OUT_RING(ring, pm4_pkt4_hdr(regindx, cnt));
OUT_RING(ring, pm4_pkt4_hdr((uint16_t)regindx, (uint16_t)cnt));
}
static inline void
OUT_PKT7(struct fd_ringbuffer *ring, uint8_t opcode, uint16_t cnt)
OUT_PKT7(struct fd_ringbuffer *ring, uint32_t opcode, uint32_t cnt)
{
BEGIN_RING(ring, cnt + 1);
OUT_RING(ring, pm4_pkt7_hdr(opcode, cnt));
OUT_RING(ring, pm4_pkt7_hdr((uint8_t)opcode, (uint16_t)cnt));
}
static inline void