diff options
Diffstat (limited to 'src/sna/sna_accel.c')
-rw-r--r-- | src/sna/sna_accel.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 9c33bb4d..9125f9cd 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -1806,12 +1806,7 @@ static inline bool region_inplace(struct sna *sna, if (wedged(sna) && !priv->pinned) return false; - if (priv->cpu) { - DBG(("%s: no, preferring last action of CPU\n", __FUNCTION__)); - return false; - } - - if (!write_only && + if ((priv->cpu || !write_only) && region_overlaps_damage(region, priv->cpu_damage, 0, 0)) { DBG(("%s: no, uncovered CPU damage pending\n", __FUNCTION__)); return false; @@ -1822,6 +1817,11 @@ static inline bool region_inplace(struct sna *sna, return true; } + if (priv->cpu) { + DBG(("%s: no, preferring last action of CPU\n", __FUNCTION__)); + return false; + } + if (priv->mapped) { DBG(("%s: yes, already mapped, continuiung\n", __FUNCTION__)); return !IS_CPU_MAP(priv->gpu_bo->map); |