summaryrefslogtreecommitdiff
path: root/src/sna/gen4_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-19 18:02:50 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-19 18:03:53 +0000
commitee99511846a0f10abeeba8d25d8fb5bf59621b02 (patch)
tree0bc06584e349184e1cfe129de78a4daae7b1d03d /src/sna/gen4_render.c
parentbfd96b092db5e4e0fc2446752deafd1156cf37b3 (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen4_render.c')
-rw-r--r--src/sna/gen4_render.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sna/gen4_render.c b/src/sna/gen4_render.c
index ee373789..d6ba3466 100644
--- a/src/sna/gen4_render.c
+++ b/src/sna/gen4_render.c
@@ -2681,15 +2681,15 @@ gen4_check_composite_spans(struct sna *sna,
return FORCE_SPANS > 0;
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__));