From 827363f886085d7659925e63a1a16634cec6a76e Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 23 Apr 2023 07:54:54 -0700 Subject: [PATCH] freedreno: Extra casting to make C++ happy Signed-off-by: Rob Clark Part-of: --- src/freedreno/common/fd6_pack.h | 2 +- src/freedreno/drm/freedreno_ringbuffer.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/freedreno/common/fd6_pack.h b/src/freedreno/common/fd6_pack.h index 354ccae..954a4fe 100644 --- a/src/freedreno/common/fd6_pack.h +++ b/src/freedreno/common/fd6_pack.h @@ -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__); \ diff --git a/src/freedreno/drm/freedreno_ringbuffer.h b/src/freedreno/drm/freedreno_ringbuffer.h index 3c2be70..49652d7 100644 --- a/src/freedreno/drm/freedreno_ringbuffer.h +++ b/src/freedreno/drm/freedreno_ringbuffer.h @@ -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 -- 2.7.4