aboutsummaryrefslogtreecommitdiffstats
path: root/src/broadcom/qpu/qpu_instr.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-03-14 15:04:32 -0700
committerEric Anholt <[email protected]>2018-03-19 16:42:59 -0700
commit4760040c0980a8921120d517d5e5809f7f0e488c (patch)
tree9f175d28782284cb857c9082dd0baa2b1c08388f /src/broadcom/qpu/qpu_instr.c
parent32791a05024d54736eab21379e849480fea78559 (diff)
broadcom/vc5: Extract v3d_qpu_writes_tmu() helper.
This will be reused in register spilling.
Diffstat (limited to 'src/broadcom/qpu/qpu_instr.c')
-rw-r--r--src/broadcom/qpu/qpu_instr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/broadcom/qpu/qpu_instr.c b/src/broadcom/qpu/qpu_instr.c
index f31c81f8ca4..96033739431 100644
--- a/src/broadcom/qpu/qpu_instr.c
+++ b/src/broadcom/qpu/qpu_instr.c
@@ -557,6 +557,16 @@ v3d_qpu_add_op_uses_vpm(enum v3d_qpu_add_op op)
}
bool
+v3d_qpu_writes_tmu(const struct v3d_qpu_instr *inst)
+{
+ return (inst->type == V3D_QPU_INSTR_TYPE_ALU &&
+ ((inst->alu.add.magic_write &&
+ v3d_qpu_magic_waddr_is_tmu(inst->alu.add.waddr)) ||
+ (inst->alu.mul.magic_write &&
+ v3d_qpu_magic_waddr_is_tmu(inst->alu.mul.waddr))));
+}
+
+bool
v3d_qpu_uses_vpm(const struct v3d_qpu_instr *inst)
{
if (inst->type == V3D_QPU_INSTR_TYPE_ALU) {