summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-10-02 09:36:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-02 11:21:32 +0100
commit04b8f0a5a16ff71c5e55e0281dbcaa32554703ec (patch)
tree6f4041678edeb242c6d38dc7076ea7b2bf2b51eb
parent32cef71efe231692f7b24f66913a8ae57bc00aa8 (diff)
sna/accel: Add a compile option to force flushing on every blockhandler
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 008e552a..69e6dec6 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -56,6 +56,7 @@
#define FORCE_GPU_ONLY 0
#define FORCE_FALLBACK 0
+#define FORCE_FLUSH 0
#define USE_SPANS 0
@@ -3310,14 +3311,6 @@ static void sna_deferred_free(struct sna *sna)
}
}
-static uint64_t read_timer(int fd)
-{
- uint64_t count = 0;
- int ret = read(fd, &count, sizeof(count));
- return count;
- (void)ret;
-}
-
static struct sna_pixmap *sna_accel_scanout(struct sna *sna)
{
PixmapPtr front = sna->shadow ? sna->shadow : sna->front;
@@ -3325,10 +3318,18 @@ static struct sna_pixmap *sna_accel_scanout(struct sna *sna)
return priv && priv->gpu_bo ? priv : NULL;
}
-#if HAVE_SYS_TIMERFD_H
+#if HAVE_SYS_TIMERFD_H && !FORCE_FLUSH
#include <sys/timerfd.h>
#include <errno.h>
+static uint64_t read_timer(int fd)
+{
+ uint64_t count = 0;
+ int ret = read(fd, &count, sizeof(count));
+ return count;
+ (void)ret;
+}
+
static void _sna_accel_disarm_timer(struct sna *sna, int id)
{
struct itimerspec to;