diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-09 11:19:13 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-09 12:37:43 +0000 |
commit | 3e82fcc8d243b7ffe1a3d3249a5cdb5fd068093f (patch) | |
tree | 49d98868bce1acfbf46446e9c460b73615fa4397 | |
parent | c8f622726a4463b419d032b379576cfb3bc492df (diff) |
sna/gen4+: Refine test for preferring GPU spans
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/gen4_render.c | 12 | ||||
-rw-r--r-- | src/sna/gen5_render.c | 16 | ||||
-rw-r--r-- | src/sna/gen6_render.c | 16 |
3 files changed, 29 insertions, 15 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c index 14ac123c..873e1a4a 100644 --- a/src/sna/gen4_render.c +++ b/src/sna/gen4_render.c @@ -2680,7 +2680,17 @@ gen4_check_composite_spans(struct sna *sna, return FORCE_SPANS > 0; if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0) { - DBG(("%s: fallback, non-rectilinear spans\n", + if ((flags & COMPOSITE_SPANS_INPLACE_HINT) == 0) { + struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable); + assert(priv); + + if ((priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) || + (priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo))) { + return true; + } + } + + DBG(("%s: fallback, non-rectilinear spans to idle bo\n", __FUNCTION__)); return false; } diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index f8cea616..bff5066b 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2692,13 +2692,15 @@ gen5_check_composite_spans(struct sna *sna, return false; } - if ((flags & (COMPOSITE_SPANS_RECTILINEAR | COMPOSITE_SPANS_INPLACE_HINT)) == 0) { - struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable); - assert(priv); - - if ((priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) || - (priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo))) { - return true; + if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0) { + if ((flags & COMPOSITE_SPANS_INPLACE_HINT) == 0) { + struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable); + assert(priv); + + if ((priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) || + (priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo))) { + return true; + } } DBG(("%s: fallback, non-rectilinear spans to idle bo\n", diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 1677a473..64830925 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -3123,13 +3123,15 @@ gen6_check_composite_spans(struct sna *sna, return false; } - if ((flags & (COMPOSITE_SPANS_RECTILINEAR | COMPOSITE_SPANS_INPLACE_HINT)) == 0) { - struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable); - assert(priv); - - if ((priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) || - (priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo))) { - return true; + if ((flags & COMPOSITE_SPANS_RECTILINEAR) == 0) { + if ((flags & COMPOSITE_SPANS_INPLACE_HINT) == 0) { + struct sna_pixmap *priv = sna_pixmap_from_drawable(dst->pDrawable); + assert(priv); + + if ((priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) || + (priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo))) { + return true; + } } DBG(("%s: fallback, non-rectilinear spans to idle bo\n", |