summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-13 12:32:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-13 13:52:41 +0100
commit97003b1a2d6c8beb5c4df4bece5a2d5b03b5ae2f (patch)
treed38fe09678894271c5721127eed35065ea0285ef /src
parent87fc78ac4f6bbfa8e9427d392356ee26942bf955 (diff)
sna/gen6+: Prefer the BLT for large overlapping copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/gen6_render.c8
-rw-r--r--src/sna/gen7_render.c8
-rw-r--r--src/sna/gen8_render.c8
3 files changed, 15 insertions, 9 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 8668d124..b141b2a0 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2725,10 +2725,9 @@ fallback_blt:
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
box, n, &extents)) {
- if (too_large(extents.x2-extents.x1, extents.y2-extents.y1))
- goto fallback_blt;
+ bool big = too_large(extents.x2-extents.x1, extents.y2-extents.y1);
- if (can_switch_to_blt(sna, dst_bo, flags) &&
+ if ((big || can_switch_to_blt(sna, dst_bo, flags)) &&
sna_blt_copy_boxes(sna, alu,
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
@@ -2736,6 +2735,9 @@ fallback_blt:
box, n))
return true;
+ if (big)
+ goto fallback_blt;
+
return sna_render_copy_boxes__overlap(sna, alu,
src, src_bo, src_dx, src_dy,
dst, dst_bo, dst_dx, dst_dy,
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 3fcca3e5..80c785d9 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2962,10 +2962,9 @@ fallback_blt:
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
box, n, &extents)) {
- if (too_large(extents.x2-extents.x1, extents.y2-extents.y1))
- goto fallback_blt;
+ bool big = too_large(extents.x2-extents.x1, extents.y2-extents.y1);
- if (can_switch_to_blt(sna, dst_bo, flags) &&
+ if ((big || can_switch_to_blt(sna, dst_bo, flags)) &&
sna_blt_copy_boxes(sna, alu,
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
@@ -2973,6 +2972,9 @@ fallback_blt:
box, n))
return true;
+ if (big)
+ goto fallback_blt;
+
return sna_render_copy_boxes__overlap(sna, alu,
src, src_bo, src_dx, src_dy,
dst, dst_bo, dst_dx, dst_dy,
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index 7ac883b8..1bde3ad7 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -2786,10 +2786,9 @@ fallback_blt:
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
box, n, &extents)) {
- if (too_large(extents.x2-extents.x1, extents.y2-extents.y1))
- goto fallback_blt;
+ bool big = too_large(extents.x2-extents.x1, extents.y2-extents.y1);
- if (can_switch_to_blt(sna, dst_bo, flags) &&
+ if ((big || can_switch_to_blt(sna, dst_bo, flags)) &&
sna_blt_copy_boxes(sna, alu,
src_bo, src_dx, src_dy,
dst_bo, dst_dx, dst_dy,
@@ -2797,6 +2796,9 @@ fallback_blt:
box, n))
return true;
+ if (big)
+ goto fallback_blt;
+
return sna_render_copy_boxes__overlap(sna, alu,
src, src_bo, src_dx, src_dy,
dst, dst_bo, dst_dx, dst_dy,