From ef34d5cf415ad7459ab44b0ec2e70b14150735fc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 14 Jul 2012 23:25:17 +0100 Subject: [PATCH] sna: Make sure we check for a busy CPU bo before declaring is-cpu Even if the pixmap is entirely damaged on the CPU, we still may be in the process of transferring it and so cause an unwanted stall. Signed-off-by: Chris Wilson --- src/sna/sna_render_inline.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sna/sna_render_inline.h b/src/sna/sna_render_inline.h index 32eb54e1..fff54360 100644 --- a/src/sna/sna_render_inline.h +++ b/src/sna/sna_render_inline.h @@ -85,10 +85,9 @@ static inline bool is_cpu(DrawablePtr drawable) { struct sna_pixmap *priv = sna_pixmap_from_drawable(drawable); - if (priv == NULL || priv->gpu_bo == NULL || priv->clear || DAMAGE_IS_ALL(priv->cpu_damage)) + if (priv == NULL || priv->gpu_bo == NULL || priv->clear) return true; - assert(!priv->gpu_bo->proxy); /* should be marked as cpu damaged */ if (priv->gpu_damage && kgem_bo_is_busy(priv->gpu_bo)) return false;