From fc39d4b5cb105d269c5349e479daf112f5d93580 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 19 Jul 2012 16:25:54 +0100 Subject: sna/gen6: Add a simple DBG option to limit usage of either BLT/RENDER We can force the code to either select only BLT or RENDER operations - for those that we have a choice for at least! Signed-off-by: Chris Wilson --- src/sna/gen6_render.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 389d002b..20a09d00 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -52,6 +52,7 @@ #define NO_FILL_CLEAR 0 #define NO_RING_SWITCH 0 +#define PREFER_RENDER 0 #define GEN6_MAX_SIZE 8192 @@ -2344,6 +2345,9 @@ gen6_composite_set_target(struct sna *sna, static bool prefer_blt_ring(struct sna *sna) { + if (PREFER_RENDER) + return PREFER_RENDER < 0; + return sna->kgem.ring != KGEM_RENDER; } @@ -3272,6 +3276,9 @@ static inline bool prefer_blt_copy(struct sna *sna, PixmapPtr dst, struct kgem_bo *dst_bo, unsigned flags) { + if (PREFER_RENDER) + return PREFER_RENDER > 0; + return (sna->kgem.ring == KGEM_BLT || (flags & COPY_LAST && sna->kgem.mode == KGEM_NONE) || prefer_blt_bo(sna, src, src_bo) || @@ -3647,6 +3654,9 @@ gen6_emit_fill_state(struct sna *sna, const struct sna_composite_op *op) static inline bool prefer_blt_fill(struct sna *sna, struct kgem_bo *bo) { + if (PREFER_RENDER) + return PREFER_RENDER < 0; + return (can_switch_rings(sna) || prefer_blt_ring(sna) || untiled_tlb_miss(bo)); -- cgit v1.2.3