aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom/qpu
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-12-14 09:28:42 -0800
committerEric Anholt <[email protected]>2018-07-31 16:05:04 -0700
commit3471ce99850cd2ebfe04a10d01f5fe69a349594f (patch)
tree4bc1b6a95aa7e1e2d411991922ace0b639c7bf8c /src/broadcom/qpu
parent7d36c866d27f60685ae471264c2059c5b52e0e48 (diff)
v3d: Add support for the TMUWT instruction.
This instruction is used to ensure that TMU stores have been processed before moving on. In particular, you need any TMU ops to be done by the time the shader ends.
Diffstat (limited to 'src/broadcom/qpu')
-rw-r--r--src/broadcom/qpu/qpu_instr.c8
-rw-r--r--src/broadcom/qpu/qpu_instr.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c
index a7fb4186e1a..0846cc86174 100644
--- a/src/broadcom/qpu/qpu_instr.c
+++ b/src/broadcom/qpu/qpu_instr.c
@@ -526,6 +526,14 @@ v3d_qpu_magic_waddr_is_tmu(enum v3d_qpu_waddr waddr)
}
bool
+v3d_qpu_waits_on_tmu(const struct v3d_qpu_instr *inst)
+{
+ return (inst->sig.ldtmu ||
+ (inst->type == V3D_QPU_INSTR_TYPE_ALU &&
+ inst->alu.add.op == V3D_QPU_A_TMUWT));
+}
+
+bool
v3d_qpu_magic_waddr_is_tlb(enum v3d_qpu_waddr waddr)
{
return (waddr == V3D_QPU_WADDR_TLB ||
diff --git a/src/broadcom/qpu/qpu_instr.h b/src/broadcom/qpu/qpu_instr.h
index c37abac3cf8..c2b4ebd1995 100644
--- a/src/broadcom/qpu/qpu_instr.h
+++ b/src/broadcom/qpu/qpu_instr.h
@@ -452,6 +452,7 @@ bool v3d_qpu_writes_r4(const struct v3d_device_info *devinfo,
const struct v3d_qpu_instr *instr) ATTRIBUTE_CONST;
bool v3d_qpu_writes_r5(const struct v3d_device_info *devinfo,
const struct v3d_qpu_instr *instr) ATTRIBUTE_CONST;
+bool v3d_qpu_waits_on_tmu(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
bool v3d_qpu_uses_mux(const struct v3d_qpu_instr *inst, enum v3d_qpu_mux mux);
bool v3d_qpu_uses_vpm(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;
bool v3d_qpu_reads_vpm(const struct v3d_qpu_instr *inst) ATTRIBUTE_CONST;