}
 }
 
-static void
-tu6_emit_cache_flush(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
-{
-   tu6_emit_event_write(cmd, cs, 0x31);
-}
-
-static void
-tu6_emit_lrz_flush(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
-{
-   tu6_emit_event_write(cmd, cs, LRZ_FLUSH);
-}
-
 static void
 tu6_emit_wfi(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
 {
 {
    const struct tu_physical_device *phys_dev = cmd->device->physical_device;
 
-   tu6_emit_cache_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, CACHE_INVALIDATE);
 
    tu_cs_emit_write_reg(cs, REG_A6XX_HLSQ_UPDATE_CNTL, 0xfffff);
 
 
    tu6_emit_bin_size(cs, 0, 0, 0xc00000); /* 0xc00000 = BYPASS? */
 
-   tu6_emit_lrz_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, LRZ_FLUSH);
 
    tu_cs_emit_pkt7(cs, CP_SET_MARKER, 1);
    tu_cs_emit(cs, A6XX_CP_SET_MARKER_0_MODE(RM6_BYPASS));
    tu_cs_emit_pkt7(cs, CP_SKIP_IB2_ENABLE_GLOBAL, 1);
    tu_cs_emit(cs, 0x0);
 
-   tu6_emit_lrz_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, LRZ_FLUSH);
 
    tu6_emit_event_write(cmd, cs, PC_CCU_FLUSH_COLOR_TS);
    tu6_emit_event_write(cmd, cs, PC_CCU_FLUSH_DEPTH_TS);
 {
    struct tu_physical_device *phys_dev = cmd->device->physical_device;
 
-   tu6_emit_lrz_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, LRZ_FLUSH);
 
    /* lrz clear? */
 
-   tu6_emit_cache_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, CACHE_INVALIDATE);
 
    tu_cs_emit_pkt7(cs, CP_SKIP_IB2_ENABLE_GLOBAL, 1);
    tu_cs_emit(cs, 0x0);
    tu_cs_emit_regs(cs,
                    A6XX_GRAS_LRZ_CNTL(0));
 
-   tu6_emit_lrz_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, LRZ_FLUSH);
 
    tu6_emit_event_write(cmd, cs, PC_CCU_RESOLVE_TS);
 
 
    tu_cs_emit_wfi(cs);
 
-   tu6_emit_cache_flush(cmd, cs);
+   tu6_emit_event_write(cmd, cs, CACHE_INVALIDATE);
 }
 
 void