diff --git a/src/freedreno/common/fd6_pack.h b/src/freedreno/common/fd6_pack.h index 354ccaed21a..954a4fe1759 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 3c2be706907..49652d72a23 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