summaryrefslogtreecommitdiff
path: root/src/sna/sna_io.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-22 14:39:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-23 10:48:52 +0100
commit42330fbae862cda9ca17ec62eb0d2e4fb86032b8 (patch)
tree4604c304ef5d8ff0886d7d0c598cff22192994b8 /src/sna/sna_io.c
parentdd130d1b06e8828d7a2471761bac36093b9a2391 (diff)
sna: Track CPU/GTT maps independently
Now that we use CPU mmaps to read/write to tiled X surfaces, we find ourselves frequently switching between CPU and GTT mmaps and so wish to cache both. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_io.c')
-rw-r--r--src/sna/sna_io.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 2bd6b82d..2a318206 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -108,7 +108,7 @@ read_boxes_inplace__cpu(struct kgem *kgem,
assert(kgem_bo_can_map__cpu(kgem, bo, false));
assert(bo->tiling != I915_TILING_Y);
- src = __kgem_bo_map__cpu(kgem, bo);
+ src = kgem_bo_map__cpu(kgem, bo);
if (src == NULL)
return false;
@@ -131,7 +131,6 @@ read_boxes_inplace__cpu(struct kgem *kgem,
box++;
} while (--n);
}
- __kgem_bo_unmap__cpu(kgem, bo, src);
return true;
}
@@ -574,7 +573,7 @@ write_boxes_inplace__tiled(struct kgem *kgem,
assert(bo->tiling == I915_TILING_X);
- dst = __kgem_bo_map__cpu(kgem, bo);
+ dst = kgem_bo_map__cpu(kgem, bo);
if (dst == NULL)
return false;
@@ -586,7 +585,6 @@ write_boxes_inplace__tiled(struct kgem *kgem,
box->x2 - box->x1, box->y2 - box->y1);
box++;
} while (--n);
- __kgem_bo_unmap__cpu(kgem, bo, dst);
return true;
}