summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-28 14:23:29 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-29 06:57:05 +0100
commit3ef966f4c5bae07108ce2720f4da3c3c4e41e1aa (patch)
treeb4cff2853c04f0f8243db41c2e9d0ca2d21e31b5
parent9fc052da5c4246402d2707b3a91efffa7dd81e08 (diff)
sna/io: Prefer CPU copies on LLC
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_io.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_io.c b/src/sna/sna_io.c
index 9e175a75..eaa2052f 100644
--- a/src/sna/sna_io.c
+++ b/src/sna/sna_io.c
@@ -117,6 +117,8 @@ read_boxes_inplace__cpu(struct kgem *kgem,
if (sigtrap_get())
return false;
+ DBG(("%s x %d\n", __FUNCTION__, n));
+
if (bo->tiling == I915_TILING_X) {
do {
memcpy_from_tiled_x(kgem, src, dst, bpp, src_pitch, dst_pitch,
@@ -210,10 +212,13 @@ static bool download_inplace(struct kgem *kgem,
if (FORCE_INPLACE)
return FORCE_INPLACE > 0;
+ if (cpu)
+ return true;
+
if (kgem->can_blt_cpu && kgem->max_cpu_size)
return false;
- return !__kgem_bo_is_busy(kgem, bo) || cpu;
+ return !__kgem_bo_is_busy(kgem, bo);
}
void sna_read_boxes(struct sna *sna, PixmapPtr dst, struct kgem_bo *src_bo,
@@ -253,7 +258,7 @@ void sna_read_boxes(struct sna *sna, PixmapPtr dst, struct kgem_bo *src_bo,
* this path.
*/
- if (download_inplace(kgem, dst, src_bo, box ,nbox)) {
+ if (download_inplace(kgem, dst, src_bo, box, nbox)) {
fallback:
read_boxes_inplace(kgem, dst, src_bo, box, nbox);
return;