Mesa (master): vc4: Drop the explicit scoreboard wait.

Eric Anholt anholt at kemper.freedesktop.org
Mon Dec 1 19:21:48 UTC 2014


Module: Mesa
Branch: master
Commit: 6958c404caf3f4b2219ef686e2beeeaf48664905
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6958c404caf3f4b2219ef686e2beeeaf48664905

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Nov 26 12:51:27 2014 -0800

vc4: Drop the explicit scoreboard wait.

This is actually implicitly handled by the TLB operations.

---

 src/gallium/drivers/vc4/vc4_qpu_emit.c |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_qpu_emit.c b/src/gallium/drivers/vc4/vc4_qpu_emit.c
index 3d7bdb4..e6e97cc 100644
--- a/src/gallium/drivers/vc4/vc4_qpu_emit.c
+++ b/src/gallium/drivers/vc4/vc4_qpu_emit.c
@@ -130,7 +130,6 @@ static void
 serialize_insts(struct vc4_compile *c)
 {
         int last_sfu_write = -10;
-        bool scoreboard_wait_emitted = false;
 
         while (!is_empty_list(&c->qpu_inst_list)) {
                 struct queued_qpu_inst *q =
@@ -210,22 +209,18 @@ serialize_insts(struct vc4_compile *c)
                  *  explicit Wait for Scoreboard signal or an implicit wait
                  *  with the first tile-buffer read or write instruction."
                  */
-                if (!scoreboard_wait_emitted &&
-                    (waddr_a == QPU_W_TLB_Z || waddr_m == QPU_W_TLB_Z ||
-                     waddr_a == QPU_W_TLB_COLOR_MS ||
-                     waddr_m == QPU_W_TLB_COLOR_MS ||
-                     waddr_a == QPU_W_TLB_COLOR_ALL ||
-                     waddr_m == QPU_W_TLB_COLOR_ALL ||
-                     QPU_GET_FIELD(q->inst, QPU_SIG) == QPU_SIG_COLOR_LOAD)) {
+                if (waddr_a == QPU_W_TLB_Z ||
+                    waddr_m == QPU_W_TLB_Z ||
+                    waddr_a == QPU_W_TLB_COLOR_MS ||
+                    waddr_m == QPU_W_TLB_COLOR_MS ||
+                    waddr_a == QPU_W_TLB_COLOR_ALL ||
+                    waddr_m == QPU_W_TLB_COLOR_ALL ||
+                    QPU_GET_FIELD(q->inst, QPU_SIG) == QPU_SIG_COLOR_LOAD) {
                         while (c->qpu_inst_count < 3 ||
                                QPU_GET_FIELD(c->qpu_insts[c->qpu_inst_count - 1],
                                              QPU_SIG) != QPU_SIG_NONE) {
                                 serialize_one_inst(c, qpu_NOP());
                         }
-                        c->qpu_insts[c->qpu_inst_count - 1] =
-                                qpu_set_sig(c->qpu_insts[c->qpu_inst_count - 1],
-                                            QPU_SIG_WAIT_FOR_SCOREBOARD);
-                        scoreboard_wait_emitted = true;
                 }
 
                 serialize_one_inst(c, q->inst);
@@ -616,6 +611,10 @@ vc4_generate_code(struct vc4_context *vc4, struct vc4_compile *c)
                 serialize_one_inst(c, qpu_NOP());
         }
 
+        /* thread end can't have TLB operations */
+        if (qpu_inst_is_tlb(c->qpu_insts[c->qpu_inst_count - 1]))
+                serialize_one_inst(c, qpu_NOP());
+
         c->qpu_insts[c->qpu_inst_count - 1] =
                 qpu_set_sig(c->qpu_insts[c->qpu_inst_count - 1],
                             QPU_SIG_PROG_END);




More information about the mesa-commit mailing list