sna/accel: Add a compile option to force flushing on every blockhandler

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-10-02 09:36:38 +01:00
parent 32cef71efe
commit 04b8f0a5a1
1 changed files with 10 additions and 9 deletions

View File

@ -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;