diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-14 15:49:42 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-01-14 17:02:48 +0000 |
commit | f235c74cd661970c76e152777e9a2c314a368a56 (patch) | |
tree | 683aed829285a6b3679329d9a23d5e6261091b01 | |
parent | 70c5e41b519e44e620948d683d3b1111494d2f48 (diff) |
sna: Tweak considering of last-cpu placement for inplace regions
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-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); |