freedreno/a5xx: call fd5_emit_ib() directly from fd5
authorRob Clark <robdclark@chromium.org>
Thu, 1 Aug 2019 00:41:20 +0000 (17:41 -0700)
committerRob Clark <robdclark@chromium.org>
Tue, 13 Aug 2019 15:08:07 +0000 (08:08 -0700)
Signed-off-by: Rob Clark <robdclark@chromium.org>
src/gallium/drivers/freedreno/a5xx/fd5_emit.c
src/gallium/drivers/freedreno/a5xx/fd5_emit.h
src/gallium/drivers/freedreno/a5xx/fd5_gmem.c

index 146a2951ff6e95b2d031580e4d68380bcad33172..67ec23ebbbef0abe0058215bb46db7472b90256e 100644 (file)
@@ -1099,20 +1099,6 @@ t7              opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)
        OUT_RING(ring, 0x00000000);
 }
 
-static void
-fd5_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
-{
-       /* for debug after a lock up, write a unique counter value
-        * to scratch6 for each IB, to make it easier to match up
-        * register dumps to cmdstream.  The combination of IB and
-        * DRAW (scratch7) is enough to "triangulate" the particular
-        * draw that caused lockup.
-        */
-       emit_marker5(ring, 6);
-       __OUT_IB5(ring, target);
-       emit_marker5(ring, 6);
-}
-
 static void
 fd5_mem_to_mem(struct fd_ringbuffer *ring, struct pipe_resource *dst,
                unsigned dst_off, struct pipe_resource *src, unsigned src_off,
index af2bbc7157312ecacd489355e638a04a1c8b5f44..70ac550fc1d4c019187649e4bbd0d5c601d2de30 100644 (file)
@@ -200,4 +200,18 @@ void fd5_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring);
 
 void fd5_emit_init(struct pipe_context *pctx);
 
+static inline void
+fd5_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
+{
+       /* for debug after a lock up, write a unique counter value
+        * to scratch6 for each IB, to make it easier to match up
+        * register dumps to cmdstream.  The combination of IB and
+        * DRAW (scratch7) is enough to "triangulate" the particular
+        * draw that caused lockup.
+        */
+       emit_marker5(ring, 6);
+       __OUT_IB5(ring, target);
+       emit_marker5(ring, 6);
+}
+
 #endif /* FD5_EMIT_H */
index c95acd66aef4072b8e5aef5d627b1fe183a61a82..df9e85a8f310ccb5aeb4be2a5913be19d62a9573 100644 (file)
@@ -345,7 +345,7 @@ emit_binning_pass(struct fd_batch *batch)
                        A5XX_RB_WINDOW_OFFSET_Y(0));
 
        /* emit IB to binning drawcmds: */
-       ctx->emit_ib(ring, batch->binning);
+       fd5_emit_ib(ring, batch->binning);
 
        fd_reset_wfi(batch);
 
@@ -376,7 +376,7 @@ fd5_emit_tile_init(struct fd_batch *batch)
        fd5_emit_restore(batch, ring);
 
        if (batch->lrz_clear)
-               ctx->emit_ib(ring, batch->lrz_clear);
+               fd5_emit_ib(ring, batch->lrz_clear);
 
        fd5_emit_lrz_flush(ring);