sna/gen7: Avoid clear-residuals overhead on all gen7
Since not just Haswell will enjoy clear-residuals, be very careful before using a potential context switch from DRI clients. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
a511f22cde
commit
ab906aa045
|
|
@ -2957,45 +2957,10 @@ prefer_blt_copy(struct sna *sna,
|
|||
struct kgem_bo *dst_bo,
|
||||
unsigned flags)
|
||||
{
|
||||
if (sna->kgem.mode == KGEM_BLT)
|
||||
return true;
|
||||
|
||||
if (sna->info->gen == 075) /* avoid clear-residuals context overhead */
|
||||
return true;
|
||||
|
||||
assert((flags & COPY_SYNC) == 0);
|
||||
|
||||
if (untiled_tlb_miss(src_bo) ||
|
||||
untiled_tlb_miss(dst_bo))
|
||||
return true;
|
||||
|
||||
if (flags & COPY_DRI && !sna->kgem.has_semaphores)
|
||||
if (sna->kgem.ring != KGEM_BLT)
|
||||
return false;
|
||||
|
||||
if (force_blt_ring(sna, dst_bo, src_bo))
|
||||
return true;
|
||||
|
||||
if ((flags & COPY_SMALL ||
|
||||
(sna->render_state.gt < 3 && src_bo == dst_bo)) &&
|
||||
can_switch_to_blt(sna, dst_bo, flags))
|
||||
return true;
|
||||
|
||||
if (kgem_bo_is_render(dst_bo) ||
|
||||
kgem_bo_is_render(src_bo))
|
||||
return false;
|
||||
|
||||
if (flags & COPY_LAST &&
|
||||
sna->render_state.gt < 3 &&
|
||||
can_switch_to_blt(sna, dst_bo, flags))
|
||||
return true;
|
||||
|
||||
if (prefer_render_ring(sna, dst_bo))
|
||||
return false;
|
||||
|
||||
if (!prefer_blt_ring(sna, dst_bo, flags))
|
||||
return false;
|
||||
|
||||
return prefer_blt_bo(sna, src_bo, dst_bo);
|
||||
return true; /* avoid clear-residuals context overhead */
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Reference in New Issue