diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-08-20 09:18:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-08-20 09:30:19 +0100 |
commit | 67f15b36faf8c4aa902d953067df0faf43387208 (patch) | |
tree | 701b4c86248ec08c607e60b11d16e3fc5bdaa7cd /src | |
parent | 5ca3ac1a90af177eb111a965e9b4dd8a27cc58fc (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/gen7_render.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index f58f39d4..e572b785 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -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) || |