From 8c0e3bbb0c301d0fa4652aa38edd84a9fd6b555e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 26 Jul 2012 14:58:04 +0100 Subject: [PATCH] sna: Force the damage on the DRI pixmap to be flushed to the GPU Otherwise nothing will happen if we consider ourselves wedged. Signed-off-by: Chris Wilson --- src/sna/sna_accel.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a517cc68..d1337ccc 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -2659,8 +2659,11 @@ sna_pixmap_move_to_gpu(PixmapPtr pixmap, unsigned flags) BoxPtr box; int n; - DBG(("%s(pixmap=%ld, usage=%d)\n", - __FUNCTION__, pixmap->drawable.serialNumber, pixmap->usage_hint)); + DBG(("%s(pixmap=%ld, usage=%d), flags=%x\n", + __FUNCTION__, + pixmap->drawable.serialNumber, + pixmap->usage_hint, + flags)); if ((flags & __MOVE_FORCE) == 0 && wedged(sna)) return NULL; @@ -13278,7 +13281,8 @@ sna_accel_flush_callback(CallbackListPtr *list, } else { DBG(("%s: flushing DRI pixmap=%ld\n", __FUNCTION__, priv->pixmap->drawable.serialNumber)); - ret = sna_pixmap_move_to_gpu(priv->pixmap, MOVE_READ); + ret = sna_pixmap_move_to_gpu(priv->pixmap, + MOVE_READ | __MOVE_FORCE); } (void)ret; }