radeon: only do the fb read if we are mapping a VRAM object
authorDave Airlie <airlied@redhat.com>
Wed, 4 Feb 2009 01:14:38 +0000 (11:14 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 4 Feb 2009 01:14:38 +0000 (11:14 +1000)
this makes writing the DMA buffers got a lot better

src/mesa/drivers/dri/radeon/radeon_bo_legacy.c

index 71fe27609b36b42831f80b83e371ee1c191b8f9d..993bac81243ff66155ff15a50b1213b120a7fd92 100644 (file)
@@ -479,7 +479,7 @@ static int bo_map(struct radeon_bo *bo, int write)
      * framebuffer, but I've found this to be unnecessary.
      *  -- Nicolai Hähnle, June 2008
      */
-    {
+    if (!(bo->domains & RADEON_GEM_DOMAIN_GTT)) {
         int p;
         volatile int *buf = (int*)boml->screen->driScreen->pFB;
         p = *buf;