tu: Add missing wfi to tu6_emit_hw()
authorConnor Abbott <cwabbott0@gmail.com>
Fri, 24 Jul 2020 13:22:37 +0000 (15:22 +0200)
committerConnor Abbott <cwabbott0@gmail.com>
Fri, 24 Jul 2020 17:20:44 +0000 (19:20 +0200)
It needs to be there before changing CCU state. This was accidentally
deleted in f494799a7f09deebacb5696fde7514e3329de246 when it should've
been moved.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6007>

src/freedreno/vulkan/tu_cmd_buffer.c

index 43e3c78386bf57d91a928f12ee7c4d6f442ff0f8..dafa9e6a9dcff0aa5d2c3414bd805543ee9bf177 100644 (file)
@@ -740,6 +740,11 @@ tu6_init_hw(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
          .gfx_bindless = 0x1f,
          .cs_bindless = 0x1f));
 
+   tu_cs_emit_wfi(cs);
+
+   cmd->state.cache.pending_flush_bits &=
+      ~(TU_CMD_FLAG_WAIT_FOR_IDLE | TU_CMD_FLAG_CACHE_INVALIDATE);
+
    tu_cs_emit_regs(cs,
                    A6XX_RB_CCU_CNTL(.offset = phys_dev->ccu_offset_bypass));
    cmd->state.ccu_state = TU_CMD_CCU_SYSMEM;