summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-08-04 00:21:53 -0700
committerEric Anholt <anholt@FreeBSD.org>2006-08-04 00:21:05 -0700
commit0fd4831fdcf4c8f43d80c66e43eff8942f89b324 (patch)
treef6dd26f5c5f2f101543eff55391df7b503892bf2 /src
parent8d0a5138503586cbf980eb9464f2db91b72509c7 (diff)
Disable dynamic front buffer mapping on i965.
Moving front buffers should only be necessary for rotation. Currently, the server isn't ready for it, and the method attempted to work around it caused crashes with DRI. Since i965 doesn't support rotation yet, this should be harmless for now.
Diffstat (limited to 'src')
-rw-r--r--src/i830_dri.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 00ff358e..af0db25f 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -664,21 +664,26 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
pScrn->virtualY * pI830->cpp);
#endif
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "[drm] Mapping front buffer\n");
- if (drmAddMap(pI830->drmSubFD,
- (drm_handle_t)(sarea->front_offset + pI830->LinearAddr),
- sarea->front_size,
- DRM_AGP,
- 0,
- (drmAddress) &sarea->front_handle) < 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
- "[drm] drmAddMap(front_handle) failed. Disabling DRI\n");
- DRICloseScreen(pScreen);
- return FALSE;
+ /* The I965G isn't ready for the front buffer mapping to be moved around,
+ * because of issues with rmmap, it seems.
+ */
+ if (!IS_I965G(pI830)) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "[drm] Mapping front buffer\n");
+ if (drmAddMap(pI830->drmSubFD,
+ (drm_handle_t)(sarea->front_offset + pI830->LinearAddr),
+ sarea->front_size,
+ DRM_AGP,
+ 0,
+ (drmAddress) &sarea->front_handle) < 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] drmAddMap(front_handle) failed. Disabling DRI\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Front Buffer = 0x%08x\n",
+ (int)sarea->front_handle);
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Front Buffer = 0x%08x\n",
- (int)sarea->front_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)(sarea->back_offset + pI830->LinearAddr),