diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 2cc45e49..dfc3384e 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1579,8 +1579,7 @@ skip_inplace_map: DBG(("%s: try to operate inplace (GTT)\n", __FUNCTION__)); assert(priv->cpu == false); - pixmap->devPrivate.ptr = - kgem_bo_map(&sna->kgem, priv->gpu_bo); + pixmap->devPrivate.ptr = kgem_bo_map(&sna->kgem, priv->gpu_bo); priv->mapped = pixmap->devPrivate.ptr != NULL; if (priv->mapped) { pixmap->devKind = priv->gpu_bo->pitch; @@ -1820,11 +1819,6 @@ static inline bool region_inplace(struct sna *sna, return false; } - if (priv->flush) { - DBG(("%s: yes, exported via dri, will flush\n", __FUNCTION__)); - return true; - } - if (priv->cpu) { DBG(("%s: no, preferring last action of CPU\n", __FUNCTION__)); return false; @@ -1835,6 +1829,11 @@ static inline bool region_inplace(struct sna *sna, return !IS_CPU_MAP(priv->gpu_bo->map); } + if (priv->flush) { + DBG(("%s: yes, exported via dri, will flush\n", __FUNCTION__)); + return true; + } + if (DAMAGE_IS_ALL(priv->gpu_damage)) { DBG(("%s: yes, already wholly damaged on the GPU\n", __FUNCTION__)); return true;