From 162e9a2bfc693db186aa481551cf76b3dc5ee55c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 10 Dec 2012 23:11:48 +0000 Subject: [PATCH] sna/dri: Disable name exchanges for SwapBuffers The DRI2 protocol is inherently racy. Fortuituously, this can be swept under the carpet by forcing the serialisation between the DRI2 clients by using a blit for the SwapBuffers. References: https://bugs.freedesktop.org/show_bug.cgi?id=58005 Signed-off-by: Chris Wilson --- src/sna/sna_dri.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 2ff138f9..83a00dd9 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -1164,6 +1164,12 @@ can_exchange(struct sna * sna, WindowPtr win = (WindowPtr)draw; PixmapPtr pixmap; + /* XXX There is an inherent race between the DRI2 client and the DRI2 + * compositor which is only masked if we force a blit and serialise + * the operations through the kernel command queue. Hopeless. + */ + return false; + if (front->format != back->format) { DBG(("%s: no, format mismatch, front = %d, back = %d\n", __FUNCTION__, front->format, back->format));