diff options
author | Eric Anholt <[email protected]> | 2014-08-24 17:47:02 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-24 22:13:25 -0700 |
commit | 54499a85fff415e5c627a44d27a3592b6633bd4b (patch) | |
tree | be1efc1e696f29f7a1ddae6974058f1e07d4754f /src/gallium/drivers/vc4/vc4_qpu.c | |
parent | 1a7035f386c4402b07e7a2073daf914f95bd0a02 (diff) |
vc4: Merge qpu_a_NOP() and qpu_m_NOP to a single qpu_NOP() helper.
Now that qpu_inst() ignores the WADDR from the other half of the
instruction, we can set both the ADD and MUL WADDRs in the NOP helper.
Thanks to that, we also no longer need to qpu_inst(NOP, NOP).
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qpu.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c index 35c65dc2eb3..b8649f7b628 100644 --- a/src/gallium/drivers/vc4/vc4_qpu.c +++ b/src/gallium/drivers/vc4/vc4_qpu.c @@ -46,23 +46,15 @@ set_src_raddr(uint64_t inst, struct qpu_reg src) } uint64_t -qpu_a_NOP() +qpu_NOP() { uint64_t inst = 0; inst |= QPU_SET_FIELD(QPU_A_NOP, QPU_OP_ADD); - inst |= QPU_SET_FIELD(QPU_W_NOP, QPU_WADDR_ADD); - inst |= QPU_SET_FIELD(QPU_SIG_NONE, QPU_SIG); - - return inst; -} - -uint64_t -qpu_m_NOP() -{ - uint64_t inst = 0; - inst |= QPU_SET_FIELD(QPU_M_NOP, QPU_OP_MUL); + + /* Note: These field values are actually non-zero */ + inst |= QPU_SET_FIELD(QPU_W_NOP, QPU_WADDR_ADD); inst |= QPU_SET_FIELD(QPU_W_NOP, QPU_WADDR_MUL); inst |= QPU_SET_FIELD(QPU_SIG_NONE, QPU_SIG); |