summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-23 10:34:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-11-06 16:55:46 +0000
commit87802b3402ec4a829c6507b4b78fcd03e30b6fe1 (patch)
treeb88ed62dc659cfb80fd92257cb9847323c71764e /src/sna/sna.h
parent33764685cbcd01548b6a23c217c7b511c1639694 (diff)
sna: Experimental support for write-combining mmaps
If we have a linear buffer, we can request the kernel mmap it directly with write-combining without having to pin it into the GTT. This allows us to efficiently upload very large buffers, and can avoid the dreaded aperture thrashing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r--src/sna/sna.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 30b0292b..9d139ede 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -675,7 +675,8 @@ void sna_pixmap_destroy(PixmapPtr pixmap);
#define assert_pixmap_map(pixmap, priv) do { \
assert(priv->mapped != MAPPED_NONE || pixmap->devPrivate.ptr == PTR(priv->ptr)); \
- assert(priv->mapped == MAPPED_NONE || pixmap->devPrivate.ptr == (priv->mapped == MAPPED_CPU ? MAP(priv->gpu_bo->map__cpu) : MAP(priv->gpu_bo->map__gtt))); \
+ assert(priv->mapped != MAPPED_CPU || pixmap->devPrivate.ptr == MAP(priv->gpu_bo->map__cpu)); \
+ assert(priv->mapped != MAPPED_GTT || pixmap->devPrivate.ptr == priv->gpu_bo->map__gtt || pixmap->devPrivate.ptr == priv->gpu_bo->map__wc); \
} while (0)
static inline void sna_pixmap_unmap(PixmapPtr pixmap, struct sna_pixmap *priv)