summaryrefslogtreecommitdiffstats
path: root/src/vivante_accel.c
diff options
context:
space:
mode:
authorRussell King <rmk@arm.linux.org.uk>2014-03-20 17:29:28 +0000
committerRussell King <rmk@arm.linux.org.uk>2014-03-20 17:29:28 +0000
commit1f95c81c467069fe3f2f0d4174228dc50dd8f7f4 (patch)
tree164b437473929d2bd0240aedc8fa5d57bf92a963 /src/vivante_accel.c
parentbaa5de5b81ff8dfd51b22334cb0a78cc44d2a859 (diff)
downloadxf86-video-armada-1f95c81c467069fe3f2f0d4174228dc50dd8f7f4.tar.gz
xf86-video-armada-1f95c81c467069fe3f2f0d4174228dc50dd8f7f4.tar.xz
Disable vivante batch processing
With modern kernel drivers, there is no need to implement batching; this is only necessary if the kernel driver is buggy and allows the commit-with-stall to return before the pending operations have been completed. This allows removal of the batch code; however, keeping the batch code around is wise should the bug reappear in later code drops. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'src/vivante_accel.c')
-rw-r--r--src/vivante_accel.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/vivante_accel.c b/src/vivante_accel.c
index c94ae88..9999d72 100644
--- a/src/vivante_accel.c
+++ b/src/vivante_accel.c
@@ -69,6 +69,7 @@ static void vivante_disable_alpha_blend(struct vivante *vivante)
+#ifdef VIVANTE_BATCH
struct vivante_batch {
struct xorg_list node;
struct xorg_list head;
@@ -248,6 +249,24 @@ static void vivante_batch_commit(struct vivante *vivante)
error:
vivante_error(vivante, "batch blit", err);
}
+#else
+void
+vivante_batch_wait_commit(struct vivante *vivante, struct vivante_pixmap *vPix)
+{
+ if (vPix->need_stall && vivante->need_stall) {
+ vivante_commit(vivante, TRUE);
+ vivante->need_stall = FALSE;
+ }
+}
+
+static void
+vivante_batch_add(struct vivante *vivante, struct vivante_pixmap *vPix)
+{
+ vivante->need_stall = TRUE;
+ vivante->need_commit = TRUE;
+ vPix->need_stall = TRUE;
+}
+#endif
enum gpuid {
@@ -270,6 +289,7 @@ gal_prepare_gpu(struct vivante *vivante, struct vivante_pixmap *vPix,
}
#endif
+#ifdef VIVANTE_BATCH
/*
* If we don't have a batch already in place, then add one now.
* This gives us a chance to error out and fallback to CPU based
@@ -282,6 +302,7 @@ gal_prepare_gpu(struct vivante *vivante, struct vivante_pixmap *vPix,
}
vivante_batch_wait(vivante, vPix);
+#endif
if (vPix->owner != GPU && !vivante_map_gpu(vivante, vPix))
return FALSE;
@@ -322,8 +343,10 @@ void vivante_commit(struct vivante *vivante, Bool stall)
{
gceSTATUS err;
+#ifdef VIVANTE_BATCH
if (vivante->batch)
vivante_batch_commit(vivante);
+#endif
err = gco2D_Flush(vivante->e2d);
if (err != gcvSTATUS_OK)