diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-11 11:49:04 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-11 11:50:53 +0100 |
commit | 8d48a43ed956ff21d779aff1a11a0f7bf6b65bcb (patch) | |
tree | 82f26f9c49a10cba8407f8ea305e8a9c89ec470f | |
parent | 6f3999f38c71689298ac44e5b64830f754199740 (diff) |
sna/gen7: Refine ring selection
Don't force us to select BLT too early if we allow ring switching. As
the RENDER ring benefits from more cacheing over time (e.g. HSW:GT3e) it
becomes much more preferable to use it over the BLT. Since we already
have the logic to decide if ring switching is possible/preferred, relax
the initial checks on where the current activity is to allow switching
between batches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen7_render.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/sna/gen7_render.c b/src/sna/gen7_render.c index f0566327..5888a048 100644 --- a/src/sna/gen7_render.c +++ b/src/sna/gen7_render.c @@ -2375,7 +2375,7 @@ reuse_source(struct sna *sna, static bool prefer_blt_composite(struct sna *sna, struct sna_composite_op *tmp) { - if (sna->kgem.ring == KGEM_BLT) + if (sna->kgem.mode == KGEM_BLT) return true; if (untiled_tlb_miss(tmp->dst.bo) || @@ -2403,8 +2403,8 @@ gen7_render_composite(struct sna *sna, if (op >= ARRAY_SIZE(gen7_blend_op)) return false; - DBG(("%s: %dx%d, current mode=%d\n", __FUNCTION__, - width, height, sna->kgem.ring)); + DBG(("%s: %dx%d, current mode=%d/%d\n", __FUNCTION__, + width, height, sna->kgem.mode, sna->kgem.ring)); if (mask == NULL && try_blt(sna, dst, src, width, height) && @@ -2691,8 +2691,8 @@ gen7_render_composite_spans(struct sna *sna, unsigned flags, struct sna_composite_spans_op *tmp) { - DBG(("%s: %dx%d with flags=%x, current mode=%d\n", __FUNCTION__, - width, height, flags, sna->kgem.ring)); + DBG(("%s: %dx%d with flags=%x, current mode=%d/%d\n", __FUNCTION__, + width, height, flags, sna->kgem.mode, sna->kgem.ring)); assert(gen7_check_composite_spans(sna, op, src, dst, width, height, flags)); @@ -2807,7 +2807,7 @@ static inline bool prefer_blt_copy(struct sna *sna, struct kgem_bo *dst_bo, unsigned flags) { - if (sna->kgem.ring == KGEM_BLT) + if (sna->kgem.mode == KGEM_BLT) return true; assert((flags & COPY_SYNC) == 0); @@ -3630,7 +3630,7 @@ gen7_render_clear(struct sna *sna, PixmapPtr dst, struct kgem_bo *bo) dst->drawable.height)); /* Prefer to use the BLT if already engaged */ - if (sna->kgem.ring == KGEM_BLT && + if (sna->kgem.mode == KGEM_BLT && gen7_render_clear_try_blt(sna, dst, bo)) return true; |