summaryrefslogtreecommitdiff
path: root/src/uxa
diff options
context:
space:
mode:
Diffstat (limited to 'src/uxa')
-rw-r--r--src/uxa/intel.h8
-rw-r--r--src/uxa/intel_dri.c5
-rw-r--r--src/uxa/intel_uxa.c4
3 files changed, 11 insertions, 6 deletions
diff --git a/src/uxa/intel.h b/src/uxa/intel.h
index 131f18ca..ded975ff 100644
--- a/src/uxa/intel.h
+++ b/src/uxa/intel.h
@@ -97,10 +97,12 @@ struct intel_pixmap {
int8_t busy :2;
uint8_t dirty :1;
uint8_t offscreen :1;
- uint8_t pinned :3;
+ uint8_t pinned :5;
#define PIN_SCANOUT 0x1
-#define PIN_DRI 0x2
-#define PIN_GLAMOR 0x4
+#define PIN_DRI2 0x2
+#define PIN_DRI3 0x4
+#define PIN_PRIME 0x8
+#define PIN_GLAMOR 0x10
};
#if HAS_DEVPRIVATEKEYREC
diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c
index acedd0b7..1a9bad0b 100644
--- a/src/uxa/intel_dri.c
+++ b/src/uxa/intel_dri.c
@@ -91,7 +91,7 @@ static uint32_t pixmap_flink(PixmapPtr pixmap)
if (dri_bo_flink(priv->bo, &name) != 0)
return 0;
- priv->pinned |= PIN_DRI;
+ priv->pinned |= PIN_DRI2;
return name;
}
@@ -984,6 +984,9 @@ can_exchange(DrawablePtr drawable, DRI2BufferPtr front, DRI2BufferPtr back)
if (front_intel->tiling != back_intel->tiling)
return FALSE;
+ if (front_intel->pinned & ~(PIN_SCANOUT | PIN_DRI2))
+ return FALSE;
+
return TRUE;
}
diff --git a/src/uxa/intel_uxa.c b/src/uxa/intel_uxa.c
index 6fb1333f..d4ba7fcc 100644
--- a/src/uxa/intel_uxa.c
+++ b/src/uxa/intel_uxa.c
@@ -1195,7 +1195,7 @@ intel_uxa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **fd_handle
drm_intel_bo_get_tiling(bo, &tiling, &swizzle);
if (tiling == I915_TILING_X) {
- if (priv->pinned & ~PIN_DRI)
+ if (priv->pinned)
return FALSE;
tiling = I915_TILING_NONE;
@@ -1219,7 +1219,7 @@ intel_uxa_share_pixmap_backing(PixmapPtr ppix, ScreenPtr slave, void **fd_handle
}
drm_intel_bo_get_tiling(bo, &tiling, &swizzle);
drm_intel_bo_gem_export_to_prime(bo, &handle);
- priv->pinned |= PIN_DRI;
+ priv->pinned |= PIN_PRIME;
*fd_handle = (void *)(long)handle;
return TRUE;