summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2019-12-16 17:45:02 +0100
committerConnor Abbott <[email protected]>2019-12-18 23:09:00 +0100
commit4c5ac156c36b697e3605a8143aafd332dd1a15e7 (patch)
treefb88d7203bfe54530e88404b7d693845f77c6b83 /src/freedreno
parentcfa1fb895ac5a752772f4d0748c1c2bce0c2e653 (diff)
freedreno: Use new macros for CP_WAIT_REG_MEM and CP_WAIT_MEM_GTE
Similar to the existing usage for CP_COND_WRITE5, this makes it clear what each of the magic parameters are for. Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3116>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index caa1a54af14..d654f0bff9b 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -1116,18 +1116,19 @@ tu6_cache_flush(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
seqno = tu6_emit_event_write(cmd, cs, CACHE_FLUSH_AND_INV_EVENT, true);
tu_cs_emit_pkt7(cs, CP_WAIT_REG_MEM, 6);
- tu_cs_emit(cs, 0x00000013);
+ tu_cs_emit(cs, CP_WAIT_REG_MEM_0_FUNCTION(WRITE_EQ) |
+ CP_WAIT_REG_MEM_0_POLL_MEMORY);
tu_cs_emit_qw(cs, cmd->scratch_bo.iova);
- tu_cs_emit(cs, seqno);
- tu_cs_emit(cs, 0xffffffff);
- tu_cs_emit(cs, 0x00000010);
+ tu_cs_emit(cs, CP_WAIT_REG_MEM_3_REF(seqno));
+ tu_cs_emit(cs, CP_WAIT_REG_MEM_4_MASK(~0));
+ tu_cs_emit(cs, CP_WAIT_REG_MEM_5_DELAY_LOOP_CYCLES(16));
seqno = tu6_emit_event_write(cmd, cs, CACHE_FLUSH_TS, true);
tu_cs_emit_pkt7(cs, CP_WAIT_MEM_GTE, 4);
- tu_cs_emit(cs, 0x00000000);
+ tu_cs_emit(cs, CP_WAIT_MEM_GTE_0_RESERVED(0));
tu_cs_emit_qw(cs, cmd->scratch_bo.iova);
- tu_cs_emit(cs, seqno);
+ tu_cs_emit(cs, CP_WAIT_MEM_GTE_3_REF(seqno));
}
static void