From 753c8bf834e45f7d63bb93cd41ecdedfa8312e68 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 25 Sep 2024 11:45:56 -0700 Subject: [PATCH] freedreno/a6xx: Emit CP_SET_AMBLE packets Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_emit.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc index 18b67287eea..a12eb5865da 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_emit.cc @@ -1136,6 +1136,21 @@ fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring) fd6_emit_ib(ring, fd6_context(ctx)->restore); fd6_emit_ccu_cntl(ring, screen, false); + OUT_PKT7(ring, CP_SET_AMBLE, 3); + uint32_t dwords = fd_ringbuffer_emit_reloc_ring_full(ring, fd6_context(ctx)->preamble, 0) / 4; + OUT_RING(ring, CP_SET_AMBLE_2_DWORDS(dwords) | + CP_SET_AMBLE_2_TYPE(BIN_PREAMBLE_AMBLE_TYPE)); + + OUT_PKT7(ring, CP_SET_AMBLE, 3); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, CP_SET_AMBLE_2_TYPE(PREAMBLE_AMBLE_TYPE)); + + OUT_PKT7(ring, CP_SET_AMBLE, 3); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, 0x00000000); + OUT_RING(ring, CP_SET_AMBLE_2_TYPE(POSTAMBLE_AMBLE_TYPE)); + if (!batch->nondraw) { trace_end_state_restore(&batch->trace, ring); }