diff options
author | Rémi Cardona <remi@gentoo.org> | 2009-10-28 12:37:38 +0100 |
---|---|---|
committer | Rémi Cardona <remi@gentoo.org> | 2009-11-05 16:58:34 +0100 |
commit | a851139c2141f6da370186148f2836e18b2acf83 (patch) | |
tree | e93d1e6009a4a994df165b6429f60ba92a6c6804 /src/i810_driver.c | |
parent | 07e0b2cff6107d6c86096c7da4e31b0c976794d5 (diff) |
configure: make --disable-dri work even if the server supports DRI
XF86DRI is defined by the SDK so not defining it here just breaks the
build. Define HAVE_DRI instead to avoid collisions.
Note: DRI2 is still enabled/disabled entirely by SDK defines.
Signed-off-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i810_driver.c')
-rw-r--r-- | src/i810_driver.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/i810_driver.c b/src/i810_driver.c index 68e45bb6..398244e2 100644 --- a/src/i810_driver.c +++ b/src/i810_driver.c @@ -72,7 +72,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "i810.h" #include "i830.h" -#ifdef XF86DRI +#ifdef HAVE_DRI #include "dri.h" #endif @@ -280,7 +280,7 @@ int I810_DEBUG = (0 #endif #ifndef I830_ONLY -#ifdef XF86DRI +#ifdef HAVE_DRI static int i810_pitches[] = { 512, 1024, @@ -651,7 +651,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) } } -#ifdef XF86DRI +#ifdef HAVE_DRI pI810->directRenderingDisabled = !xf86ReturnOptValBool(pI810->Options, OPTION_DRI, TRUE); @@ -852,7 +852,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes, clockRanges, -#ifndef XF86DRI +#ifndef HAVE_DRI 0, 320, 1600, 64 * pScrn->bitsPerPixel, #else i810_pitches, 0, 0, 64 * pScrn->bitsPerPixel, @@ -908,7 +908,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) pI810->allowPageFlip=FALSE; enable = xf86ReturnOptValBool(pI810->Options, OPTION_PAGEFLIP, FALSE); -#ifdef XF86DRI +#ifdef HAVE_DRI if (!pI810->directRenderingDisabled) { pI810->allowPageFlip = enable; if (pI810->allowPageFlip == TRUE) @@ -946,7 +946,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags) pI810->numSurfaces = 0; } -#ifdef XF86DRI +#ifdef HAVE_DRI /* Load the dri module if requested. */ if (xf86ReturnOptValBool(pI810->Options, OPTION_DRI, FALSE)) { xf86LoadSubModule(pScrn, "dri"); @@ -1662,7 +1662,7 @@ I810ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) if (!I810SetMode(pScrn, mode)) return FALSE; -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->directRenderingEnabled) { DRILock(screenInfo.screens[pScrn->scrnIndex], 0); pI810->LockHeld = 1; @@ -1671,7 +1671,7 @@ I810ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) DoRestore(pScrn, &hwp->ModeReg, &pI810->ModeReg, FALSE); -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->directRenderingEnabled) { DRIUnlock(screenInfo.screens[pScrn->scrnIndex]); pI810->LockHeld = 0; @@ -1943,7 +1943,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) * memory. Wonder if this is going to be a problem... */ -#ifdef XF86DRI +#ifdef HAVE_DRI /* * Setup DRI after visuals have been established, but before fbScreenInit * is called. fbScreenInit will eventually call into the drivers @@ -2011,7 +2011,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) xf86SetBlackWhitePixels(pScreen); -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) { pI810->directRenderingEnabled = FALSE; driFrom = X_PROBED; @@ -2089,7 +2089,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) I810InitVideo(pScreen); -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->directRenderingEnabled) { /* Now that mi, fb, drm and others have done their thing, * complete the DRI setup. @@ -2139,7 +2139,7 @@ I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) * If lockups on mode switch are still seen revisit this code. (EE) */ -# ifdef XF86DRI +# ifdef HAVE_DRI if (pI810->directRenderingEnabled) { if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("calling dri lock\n"); @@ -2154,7 +2154,7 @@ I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) } I810Restore(pScrn); -# ifdef XF86DRI +# ifdef HAVE_DRI if (pI810->directRenderingEnabled) { if (!I810DRILeave(pScrn)) return FALSE; @@ -2228,7 +2228,7 @@ I810EnterVT(int scrnIndex, int flags) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; -#ifdef XF86DRI +#ifdef HAVE_DRI I810Ptr pI810 = I810PTR(pScrn); #endif @@ -2238,7 +2238,7 @@ I810EnterVT(int scrnIndex, int flags) if (!I810BindGARTMemory(pScrn)) { return FALSE; } -#ifdef XF86DRI +#ifdef HAVE_DRI if (!I810DRIEnter(pScrn)) { return FALSE; } @@ -2266,7 +2266,7 @@ I810LeaveVT(int scrnIndex, int flags) if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("\n\n\nLeave VT\n"); -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->directRenderingEnabled) { if (I810_DEBUG & DEBUG_VERBOSE_DRI) ErrorF("calling dri lock\n"); @@ -2284,7 +2284,7 @@ I810LeaveVT(int scrnIndex, int flags) if (!I810UnbindGARTMemory(pScrn)) return; -#ifdef XF86DRI +#ifdef HAVE_DRI if (!I810DRILeave(pScrn)) return; #endif @@ -2309,7 +2309,7 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen) I810Restore(pScrn); vgaHWLock(hwp); } -#ifdef XF86DRI +#ifdef HAVE_DRI if (pI810->directRenderingEnabled) { I810DRICloseScreen(pScreen); pI810->directRenderingEnabled = FALSE; |