From 0fd4831fdcf4c8f43d80c66e43eff8942f89b324 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 4 Aug 2006 00:21:53 -0700 Subject: [PATCH] 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. --- src/i830_dri.c | 33 +++++++++++++++++++-------------- 1 file 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),