summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-05-17 22:46:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-05-18 15:36:38 +0100
commit8ba800c63906fb29d34f40b9437092a665bffb14 (patch)
tree7cc2b034a9f8ae33f42f6d8b1e5fd1a98382e57d
parentdad24721a13ce3a357e8ddae3c2dea61045f6fc2 (diff)
sna: Don't consider uploading inplace if the dst bo is unmappable
Handle (and take advantage of) the fallback at the high level rather than masquerading an inplace write. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 1b671b08..8b1ab65e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -2726,6 +2726,9 @@ static bool upload_inplace(struct sna *sna,
if (priv->gpu_bo) {
assert(priv->gpu_bo->proxy == NULL);
+ if (!kgem_bo_can_map(&sna->kgem, priv->gpu_bo))
+ return false;
+
if (!kgem_bo_is_busy(priv->gpu_bo))
return true;