summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-06 11:38:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-06 11:43:48 +0100
commit9bdf46d6c1a29b7b9e3d35e39a2e789334c0e1be (patch)
tree9acecde0baef2d52b5639604194fde0e1b6e041b /src/sna/sna.h
parent39c4be2b0be66ed83bf059d3007f4143325e340d (diff)
sna/prime: Distinguish forms of pinned pixmap
So that we can allow prime to replace the backing bo of currently exported pixmaps through DRI2. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r--src/sna/sna.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index b8760616..44e7f6e4 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -123,7 +123,10 @@ struct sna_pixmap {
#define SOURCE_BIAS 4
uint16_t source_count;
- uint8_t pinned :1;
+ uint8_t pinned :3;
+#define PIN_SCANOUT 0x1
+#define PIN_DRI 0x2
+#define PIN_PRIME 0x4
uint8_t mapped :1;
uint8_t shm :1;
uint8_t clear :1;
@@ -542,7 +545,7 @@ static inline struct kgem_bo *sna_pixmap_get_bo(PixmapPtr pixmap)
return sna_pixmap(pixmap)->gpu_bo;
}
-static inline struct kgem_bo *sna_pixmap_pin(PixmapPtr pixmap)
+static inline struct kgem_bo *sna_pixmap_pin(PixmapPtr pixmap, unsigned flags)
{
struct sna_pixmap *priv;
@@ -550,7 +553,7 @@ static inline struct kgem_bo *sna_pixmap_pin(PixmapPtr pixmap)
if (!priv)
return NULL;
- priv->pinned = 1;
+ priv->pinned |= flags;
return priv->gpu_bo;
}