summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_batch.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-11-08 10:50:03 -0500
committerRob Clark <[email protected]>2016-11-30 12:35:49 -0500
commit946cf4eb6846767306a221eec7d0f82d20dfb6b5 (patch)
treebb35f2837a125ed66736c7ff96be954685891b09 /src/gallium/drivers/freedreno/freedreno_batch.c
parentfcba3046e1b90ecec6f5f4ad5397cd36e0c740ac (diff)
freedreno/a5xx: initial support
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index 276f6be93d9..ec6f1cd37e5 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -403,3 +403,18 @@ fd_batch_check_size(struct fd_batch *batch)
(fd_mesa_debug & FD_DBG_FLUSH))
fd_batch_flush(batch, true);
}
+
+/* emit a WAIT_FOR_IDLE only if needed, ie. if there has not already
+ * been one since last draw:
+ */
+void
+fd_wfi(struct fd_batch *batch, struct fd_ringbuffer *ring)
+{
+ if (batch->needs_wfi) {
+ if (batch->ctx->screen->gpu_id >= 500)
+ OUT_WFI5(ring);
+ else
+ OUT_WFI(ring);
+ batch->needs_wfi = false;
+ }
+}