From a3088c6ba17d136131f76993d789305256fde2bf Mon Sep 17 00:00:00 2001
From: Bernardo Innocenti <bernie@codewiz.org>
Date: Wed, 11 Jul 2007 08:55:17 -0400
Subject: [PATCH] Fix potential CPU/GP race in lx_get_source_color()
Organization: One Laptop Per Child

---
 src/amd_lx_exa.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/amd_lx_exa.c b/src/amd_lx_exa.c
index 3f079cd..69c8fa6 100644
--- a/src/amd_lx_exa.c
+++ b/src/amd_lx_exa.c
@@ -262,6 +262,9 @@ static unsigned int lx_get_source_color(PicturePtr pSrc, int x, int y, int dstFo
   
   bits += (y * stride) + (x * (bpp >> 3));
 
+  /* GP may still be working on this surface */
+  gp_wait_until_idle();
+
   /* Read the source value */
 
   switch(bpp) {
-- 
1.5.2.2

