sna/gen7: Prefer blitter for plain copies on Haswell

Since the clear-residuals security fix on gen7, context switches are
very slow. If X is being used with DRI clients, those clients will
typically be using the 3D engine for themselves and every frame
presented will then be copied by X, causing at least a couple of context
switches per frame. That greatly diminishes throughput, but if we prefer
to use the blitter engine for X, we can mostly keep off the render engine
avoiding the context thrash.

Reported-by: Rafael Ristovski <rafael.ristovski@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2020-08-20 09:18:19 +01:00
parent 5ca3ac1a90
commit 67f15b36fa
1 changed files with 3 additions and 0 deletions

View File

@ -2960,6 +2960,9 @@ prefer_blt_copy(struct sna *sna,
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) ||