From 241625c48687fc820f5dc4d211ff53b5b096d30f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 13 Jun 2014 18:56:57 +0100 Subject: [PATCH] sna: Only discard the CPU bo if we have a GPU bo to transfer the damage to Fixes regression from commit ad0390068832ad4727371902fe41a85a53de1894 [2.99.903] Author: Chris Wilson Date: Tue Sep 24 10:00:03 2013 +0100 sna: Separate out copy preferrence from operating in place decision Reported-by: Nick Bowler Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79992 Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 72c16d3..13fe6ed 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; } -- 2.0.0