assert(private->pixmap == pixmap);
assert(sna_pixmap(pixmap)->flush);
assert(sna_pixmap(pixmap)->gpu_bo == private->bo);
- assert(sna_pixmap(pixmap)->pinned & PIN_DRI);
+ assert(sna_pixmap(pixmap)->pinned & PIN_DRI2);
assert(kgem_bo_flink(&sna->kgem, private->bo) == buffer->name);
assert(8*private->bo->pitch >= pixmap->drawable.width * pixmap->drawable.bitsPerPixel);
assert(private->bo->pitch * pixmap->drawable.height <= kgem_bo_size(private->bo));
priv = sna_pixmap(pixmap);
assert(priv->flush == false);
- assert((priv->pinned & PIN_DRI) == 0);
+ assert((priv->pinned & PIN_DRI2) == 0);
/* Don't allow this named buffer to be replaced */
- priv->pinned |= PIN_DRI;
+ priv->pinned |= PIN_DRI2;
/* We need to submit any modifications to and reads from this
* buffer before we send any reply to the Client.
assert(sna_pixmap_get_buffer(pixmap) == buffer);
assert(priv->gpu_bo == private->bo);
assert(priv->gpu_bo->flush);
- assert(priv->pinned & PIN_DRI);
+ assert(priv->pinned & PIN_DRI2);
assert(priv->flush);
/* Undo the DRI markings on this pixmap */
list_del(&priv->flush_list);
priv->gpu_bo->flush = false;
- priv->pinned &= ~PIN_DRI;
+ priv->pinned &= ~PIN_DRI2;
priv->flush = false;
sna_accel_watch_flush(sna, -1);
assert(pixmap->drawable.height * bo->pitch <= kgem_bo_size(bo));
assert(bo->proxy == NULL);
assert(bo->flush);
- assert(priv->pinned & PIN_DRI);
+ assert(priv->pinned & PIN_DRI2);
assert((priv->pinned & PIN_PRIME) == 0);
assert(priv->flush);
return false;
}
+ if (sna_pixmap(pixmap)->pinned & ~(PIN_DRI2 | PIN_SCANOUT)) {
+ DBG(("%s -- no, pinned: front %x\n",
+ __FUNCTION__, get_private(front)->pinned));
+ return false;
+ }
+
return true;
}
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;
}
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;