summaryrefslogtreecommitdiff
path: root/src/sna/sna_dri.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-07-20 16:04:37 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-07-21 11:45:37 +0100
commit286b0e1a48cab85191dfbb112c8dd14aeaa70956 (patch)
treed62f20e6892cb1bd08aeba50cf186ec8f86aa189 /src/sna/sna_dri.c
parent93c794eb3f80bef64f1619986a7c950229dc7a47 (diff)
sna: Refresh experimental userptr vmap support
Bring the code uptodate with both kernel interface changes and internal adjustments following the creation of CPU buffers with set-cacheing. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r--src/sna/sna_dri.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index da2f3580..cfb9d986 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -155,6 +155,10 @@ static struct kgem_bo *sna_pixmap_set_dri(struct sna *sna,
struct sna_pixmap *priv;
int tiling;
+ priv = sna_pixmap(pixmap);
+ if (priv == NULL || priv->shm)
+ return NULL;
+
priv = sna_pixmap_force_to_gpu(pixmap, MOVE_READ | MOVE_WRITE);
if (priv == NULL)
return NULL;