sna/gen6+: Only allow switching to BLT for fills if we have semaphores

An extra caveat to these generations for

commit 97d809c26b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 10 00:15:55 2013 +0100

    sna: Pass usage hint down to render fill routines

is that we don't want to incur ring switch overheads that may overwhelm
any advantages from using the BLT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-10-10 12:18:31 +01:00
parent c99d44d7f0
commit ddcd860702
2 changed files with 4 additions and 2 deletions

View File

@ -3116,7 +3116,8 @@ static inline bool prefer_blt_fill(struct sna *sna,
if (PREFER_RENDER)
return PREFER_RENDER < 0;
if (flags & (FILL_POINTS | FILL_SPANS))
if (flags & (FILL_POINTS | FILL_SPANS) &&
can_switch_to_blt(sna, bo, 0))
return true;
if (untiled_tlb_miss(bo))

View File

@ -3349,7 +3349,8 @@ static inline bool prefer_blt_fill(struct sna *sna,
struct kgem_bo *bo,
unsigned flags)
{
if (flags & (FILL_POINTS | FILL_SPANS))
if (flags & (FILL_POINTS | FILL_SPANS) &&
can_switch_to_blt(sna, bo, 0))
return true;
if (untiled_tlb_miss(bo))