From ee99511846a0f10abeeba8d25d8fb5bf59621b02 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 19 Dec 2012 18:02:50 +0000 Subject: sna/gen4+: Tweak preference of GPU placement for spans If the CPU bo is busy, make sure we do not stall for an inplace operation. Signed-off-by: Chris Wilson --- src/sna/gen5_render.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/sna/gen5_render.c') diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c index 3a9fd8c1..054829e1 100644 --- a/src/sna/gen5_render.c +++ b/src/sna/gen5_render.c @@ -2693,15 +2693,15 @@ gen5_check_composite_spans(struct sna *sna, } 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); + 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 (priv->cpu_bo && kgem_bo_is_busy(priv->cpu_bo)) + return true; + + if ((flags & COMPOSITE_SPANS_INPLACE_HINT) == 0 && + priv->gpu_bo && kgem_bo_is_busy(priv->gpu_bo)) + return true; DBG(("%s: fallback, non-rectilinear spans to idle bo\n", __FUNCTION__)); -- cgit v1.2.3