summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-03-13 08:52:45 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2014-03-13 08:54:56 +0000
commit44fe21018330e0ce750ce25be36cc780ccdb78eb (patch)
tree5d8d401cdfae369b83ca840f03bccd4908a67a73
parent5d8ded0dd671fbcbd212e06afbea88a7a56a8f0d (diff)
sna/gen6+: Simplify BLT vs RENDER decisions for fill ops
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/gen6_common.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h
index 39e6150b..0dddeb53 100644
--- a/src/sna/gen6_common.h
+++ b/src/sna/gen6_common.h
@@ -173,24 +173,25 @@ static inline bool prefer_blt_fill(struct sna *sna,
if (PREFER_RENDER)
return PREFER_RENDER < 0;
- if (flags & (FILL_POINTS | FILL_SPANS) &&
- can_switch_to_blt(sna, bo, 0))
- return true;
-
if (untiled_tlb_miss(bo))
return true;
if (force_blt_ring(sna))
return true;
- if (kgem_bo_is_render(bo))
- return false;
+ if ((flags & (FILL_POINTS | FILL_SPANS)) == 0) {
+ if (kgem_bo_is_render(bo))
+ return false;
- if (prefer_render_ring(sna, bo))
- return false;
+ if (prefer_render_ring(sna, bo))
+ return false;
- if (!prefer_blt_ring(sna, bo, 0))
- return false;
+ if (!prefer_blt_ring(sna, bo, 0))
+ return false;
+ } else {
+ if (can_switch_to_blt(sna, bo, 0))
+ return true;
+ }
return prefer_blt_bo(sna, bo);
}