summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-03-07 10:58:53 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-03-07 10:58:53 +0000
commitaefedd2baff8beaa5a5548bcf7a126ab6fca310b (patch)
tree3ef252f23f4820278c161c32ad9887527b7406d0
parent8e8eac509731747f1076bcaf1cbadac1b6daca0b (diff)
sna/gen6+: Prefer the BLT for small copies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_render.c4
-rw-r--r--src/sna/gen7_render.c4
-rw-r--r--src/sna/gen8_render.c4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c
index 973af9d2..2afe5ee2 100644
--- a/src/sna/gen6_render.c
+++ b/src/sna/gen6_render.c
@@ -2694,6 +2694,10 @@ static inline bool prefer_blt_copy(struct sna *sna,
kgem_bo_is_render(src_bo))
return false;
+ if (flags & COPY_LAST &&
+ can_switch_to_blt(sna, dst_bo, flags))
+ return true;
+
if (prefer_render_ring(sna, dst_bo))
return false;
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c
index 87b0ca6f..e8e14b54 100644
--- a/src/sna/gen7_render.c
+++ b/src/sna/gen7_render.c
@@ -2897,6 +2897,10 @@ prefer_blt_copy(struct sna *sna,
kgem_bo_is_render(src_bo))
return false;
+ if (flags & COPY_LAST &&
+ can_switch_to_blt(sna, dst_bo, flags))
+ return true;
+
if (prefer_render_ring(sna, dst_bo))
return false;
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c
index f6747ef1..b5a4895b 100644
--- a/src/sna/gen8_render.c
+++ b/src/sna/gen8_render.c
@@ -2720,6 +2720,10 @@ prefer_blt_copy(struct sna *sna,
kgem_bo_is_render(src_bo))
return false;
+ if (flags & COPY_LAST &&
+ can_switch_to_blt(sna, dst_bo, flags))
+ return true;
+
if (prefer_render_ring(sna, dst_bo))
return false;