xf86-video-intel: src/i830_driver.c src/i830_exa.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Fri Apr 3 11:16:53 PDT 2009


 src/i830_driver.c |    3 ++-
 src/i830_exa.c    |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 6cd914ef315036ce8e91c7b6492994353e8ed2d8
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Fri Apr 3 11:15:18 2009 -0700

    Fix offset in begin_gtt_access case
    
    Don't use bo->virtual in the begin_gtt_access case, use the framebuffer
    mapping and bo offset instead.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

diff --git a/src/i830_driver.c b/src/i830_driver.c
index d7ee615..32ca6c9 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -846,11 +846,12 @@ i830_update_front_offset(ScrnInfoPtr pScrn)
 	      if (drm_intel_gem_bo_map_gtt(bo))
 		  xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
 			     __FUNCTION__);
+	      data = bo->virtual;
 	  } else {
 	      /* Will already be pinned by bind_all_memory in this case */
 	      drm_intel_gem_bo_start_gtt_access(bo, 1);
+	      data = pI830->FbBase + bo->offset;
 	  }
-	  data = bo->virtual;
       }
    }
    if (!pScreen->ModifyPixmapHeader(pScreen->GetScreenPixmap(pScreen),
diff --git a/src/i830_exa.c b/src/i830_exa.c
index fc4e66c..39011bc 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -867,12 +867,13 @@ i830_uxa_prepare_access (PixmapPtr pixmap, uxa_access_t access)
 			   __FUNCTION__);
 		return FALSE;
 	    }
+	    pixmap->devPrivate.ptr = bo->virtual;
 	} else { /* or not... */
 	    if (drm_intel_bo_pin(bo, 4096) != 0)
 		return FALSE;
 	    drm_intel_gem_bo_start_gtt_access(bo, access == UXA_ACCESS_RW);
+	    pixmap->devPrivate.ptr = i830->FbBase + bo->offset;
 	}
-	pixmap->devPrivate.ptr = bo->virtual;
     }
     return TRUE;
 }


More information about the xorg-commit mailing list