summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-27 12:28:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-27 12:29:15 +0000
commit3640a0d4cb9e0f115fda9ea36212670f6ccafb22 (patch)
treefb79ee6f8d34d95a5ec87c5df2b07f07e4442a45
parent6fd8d74a6aedb6484e53e704d9f44e0bf83ae9ab (diff)
Revert "meh"
This reverts commit 4adb6967a84af8a04769c2d936a41f4a49ed1428. Oops, this debugging commit was not intended to be pushed along with the bugfix. :( Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 27b93279..3dd78632 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1376,10 +1376,15 @@ static void kgem_finish_partials(struct kgem *kgem)
if (!bo->base.exec)
continue;
- if (bo->write & KGEM_BUFFER_WRITE_INPLACE) {
- DBG(("%s: retaining partial upload buffer (%d/%d)\n",
- __FUNCTION__, bo->used, bytes(&bo->base)));
- continue;
+ if (bo->mmapped) {
+ assert(bo->write & KGEM_BUFFER_WRITE_INPLACE);
+ assert(!bo->need_io);
+ if (kgem->has_llc || !IS_CPU_MAP(bo->base.map)) {
+ DBG(("%s: retaining partial upload buffer (%d/%d)\n",
+ __FUNCTION__, bo->used, bytes(&bo->base)));
+ continue;
+ }
+ goto decouple;
}
if (!bo->used) {