diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 18:56:57 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 21:43:59 +0100 |
commit | b082a07a69ba5490fba47766c4f608b1cdf2427e (patch) | |
tree | a39f3b7943754ce4494f19ecde9a5eeba33c958e | |
parent | 05fdfe3b2813495ea122471ed6dde340e538aa65 (diff) |
sna: Only discard the CPU bo if we have a GPU bo to transfer the damage to
References: https://bugs.freedesktop.org/show_bug.cgi?id=79992
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 72c16d3f..13fe6ed6 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -6005,7 +6005,8 @@ static void discard_cpu_damage(struct sna *sna, struct sna_pixmap *priv) sna_damage_destroy(&priv->cpu_damage); list_del(&priv->flush_list); - sna_pixmap_free_cpu(sna, priv, priv->cpu); + if (priv->gpu_bo && sna_pixmap_free_cpu(sna, priv, priv->cpu)) + sna_damage_all(&priv->gpu_damage, priv->pixmap); priv->cpu = false; } |