diff options
author | Eric Anholt <[email protected]> | 2014-11-26 17:01:59 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-12-01 11:00:23 -0800 |
commit | 2d5784c8254b4a0e3e04dd0f1e46ab1eb85612dd (patch) | |
tree | f5d5e1efee525c39ed92c71a216f4d21f1601c46 /src/gallium/drivers/vc4/vc4_qpu.c | |
parent | bb19f2c3c4a47c25c2680ad2d94a10f8ee5e70d7 (diff) |
vc4: Add another check for invalid TLB scoreboard handling.
This was caught by an assertion in the simulator.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qpu.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qpu.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qpu.c b/src/gallium/drivers/vc4/vc4_qpu.c index a551a0fa187..093ca077e6d 100644 --- a/src/gallium/drivers/vc4/vc4_qpu.c +++ b/src/gallium/drivers/vc4/vc4_qpu.c @@ -244,3 +244,26 @@ qpu_set_cond_mul(uint64_t inst, uint32_t sig) return (inst & ~QPU_COND_MUL_MASK) | QPU_SET_FIELD(sig, QPU_COND_MUL); } +bool +qpu_waddr_is_tlb(uint32_t waddr) +{ + switch (waddr) { + case QPU_W_TLB_COLOR_ALL: + case QPU_W_TLB_COLOR_MS: + case QPU_W_TLB_Z: + return true; + default: + return false; + } +} + +bool +qpu_inst_is_tlb(uint64_t inst) +{ + uint32_t sig = QPU_GET_FIELD(inst, QPU_SIG); + + return (qpu_waddr_is_tlb(QPU_GET_FIELD(inst, QPU_WADDR_ADD)) || + qpu_waddr_is_tlb(QPU_GET_FIELD(inst, QPU_WADDR_MUL)) || + sig == QPU_SIG_COLOR_LOAD || + sig == QPU_SIG_WAIT_FOR_SCOREBOARD); +} |