summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-23 15:38:30 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-23 15:38:30 +0000
commitaef56b194d4de9bd71ab71e3d93d81e1750262c5 (patch)
tree06e3e2c2acb04fbfefc2ff5e39e9134a0390a882
parentc67e6a05ff729c0ddb26775e1c8533be1144d85a (diff)
sna: Mark GPU bo as busy when drawing to an all-damaged pixmap for core
The fast path to decide whether to use the GPU bo for the core drawaing operations forgot to update the active status of the pixmap. This included forgetting to clear the is-cleared flag. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c195dc13..3f53e01e 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -727,8 +727,10 @@ static Bool sna_destroy_pixmap(PixmapPtr pixmap)
static inline void list_move(struct list *list, struct list *head)
{
- __list_del(list->prev, list->next);
- list_add(list, head);
+ if (list->prev != head) {
+ __list_del(list->prev, list->next);
+ list_add(list, head);
+ }
}
static inline bool pixmap_inplace(struct sna *sna,
@@ -1630,6 +1632,10 @@ _sna_drawable_use_gpu_bo(DrawablePtr drawable,
if (DAMAGE_IS_ALL(priv->gpu_damage)) {
*damage = NULL;
+ if (!priv->pinned)
+ list_move(&priv->inactive,
+ &to_sna_from_pixmap(pixmap)->active_pixmaps);
+ priv->clear = false;
return TRUE;
}