diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-22 19:45:16 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-04-22 20:35:07 +0100 |
commit | 52bc0b119cab977b82cbbd96f689b7376b83d6f2 (patch) | |
tree | 0dfced1af5205f9799475afd486bb5f79d5adf4a /src/sna | |
parent | 45475fb7c9d84579c836b5893571c5185d568198 (diff) |
sna/gen6: Do not force a blt switch onto a Y-tiled surface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/gen6_common.h | 11 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen7_render.c | 2 | ||||
-rw-r--r-- | src/sna/gen8_render.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/sna/gen6_common.h b/src/sna/gen6_common.h index 4bf69b11..898cda80 100644 --- a/src/sna/gen6_common.h +++ b/src/sna/gen6_common.h @@ -110,7 +110,7 @@ static int prefer_blt_bo(struct sna *sna, return dst->tiling == I915_TILING_NONE || is_uncached(sna, dst); } -inline static bool force_blt_ring(struct sna *sna) +inline static bool force_blt_ring(struct sna *sna, struct kgem_bo *bo) { if (sna->kgem.mode == KGEM_RENDER) return false; @@ -118,6 +118,9 @@ inline static bool force_blt_ring(struct sna *sna) if (NO_RING_SWITCH(sna)) return sna->kgem.ring == KGEM_BLT; + if (bo->tiling == I915_TILING_Y) + return false; + if (sna->flags & SNA_POWERSAVE) return true; @@ -133,7 +136,7 @@ prefer_blt_ring(struct sna *sna, struct kgem_bo *bo, unsigned flags) if (PREFER_RENDER) return PREFER_RENDER < 0; - assert(!force_blt_ring(sna)); + assert(!force_blt_ring(sna, bo)); assert(!kgem_bo_is_render(bo) || NO_RING_SWITCH(sna)); if (kgem_bo_is_blt(bo)) @@ -173,7 +176,7 @@ prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp) untiled_tlb_miss(tmp->src.bo)) return true; - if (force_blt_ring(sna)) + if (force_blt_ring(sna, tmp->dst.bo)) return true; if (prefer_render_ring(sna, tmp->dst.bo)) @@ -194,7 +197,7 @@ prefer_blt_fill(struct sna *sna, struct kgem_bo *bo, unsigned flags) if (untiled_tlb_miss(bo)) return true; - if (force_blt_ring(sna)) + if (force_blt_ring(sna, bo)) return true; if ((flags & (FILL_POINTS | FILL_SPANS)) == 0) { diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 312d6afd..ca1f9c58 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -2718,7 +2718,7 @@ static inline bool prefer_blt_copy(struct sna *sna, untiled_tlb_miss(dst_bo)) return true; - if (force_blt_ring(sna)) + if (force_blt_ring(sna, dst_bo)) return true; if (kgem_bo_is_render(dst_bo) || diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index d1de7522..6c0e7f4f 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2916,7 +2916,7 @@ prefer_blt_copy(struct sna *sna, if (flags & COPY_DRI && !sna->kgem.has_semaphores) return false; - if (force_blt_ring(sna)) + if (force_blt_ring(sna, dst_bo)) return true; if ((flags & COPY_SMALL || diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index b40c582a..660fc5a2 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -2766,7 +2766,7 @@ prefer_blt_copy(struct sna *sna, if (flags & COPY_DRI && !sna->kgem.has_semaphores) return false; - if (force_blt_ring(sna)) + if (force_blt_ring(sna, dst_bo)) return true; if ((flags & COPY_SMALL || |