summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-28 13:03:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-28 13:03:54 +0000
commit974abd0c3acca7d3b782251d562bf00fd34b395d (patch)
tree4e95f1c0f900c1785b8a437c55cba863ce5dca49 /src
parent64f1fbb465bdd092c4ea4aafe10382ebe7b84ecb (diff)
sna: Prefer using userptr for PutImage into large GPU bo
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_accel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 8abdf840..9b54c5e2 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4209,7 +4209,9 @@ try_upload_blt(PixmapPtr pixmap, RegionRec *region,
assert(priv->gpu_bo);
assert(priv->gpu_bo->proxy == NULL);
- if (!__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo)) {
+ if ((priv->create & (KGEM_CAN_CREATE_GTT | KGEM_CAN_CREATE_LARGE)) == KGEM_CAN_CREATE_GTT &&
+ kgem_bo_can_map(&sna->kgem, priv->gpu_bo) &&
+ !__kgem_bo_is_busy(&sna->kgem, priv->gpu_bo)) {
DBG(("%s: no, target is idle\n", __FUNCTION__));
return false;
}