sna/gen6: Do not force a blt switch onto a Y-tiled surface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
45475fb7c9
commit
52bc0b119c
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) ||
|
||||
|
|
|
|||
|
|
@ -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 ||
|
||||
|
|
|
|||
|
|
@ -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 ||
|
||||
|
|
|
|||
Loading…
Reference in New Issue