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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-07-14 23:25:17 +01:00
parent 0e397e4a1d
commit ef34d5cf41
1 changed files with 1 additions and 2 deletions

View File

@ -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;