diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2012-01-04 13:58:01 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-01-04 14:13:46 +1000 |
commit | 9c1f8f775ca692858fd88e325ef815cc49e55805 (patch) | |
tree | b62823a21c72c8c169aecd37bfdd529e19462dd8 | |
parent | 16724f3ecd322c64d9ee164fb122d4285d9cef08 (diff) |
Untangle XF86DRI from the driver-specific DRI define
XF86DRI is defined by xorg-server.h, so --disable-dri in the sis driver
itself does exactly nothing other than not fill in the CFLAGS and thus stop
the driver from compiling.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/sis.h | 16 | ||||
-rw-r--r-- | src/sis_dri.c | 2 | ||||
-rw-r--r-- | src/sis_driver.c | 14 | ||||
-rw-r--r-- | src/sis_opt.c | 4 |
5 files changed, 23 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac index 036a448..a599108 100644 --- a/configure.ac +++ b/configure.ac @@ -99,8 +99,8 @@ AC_MSG_RESULT([$DRI]) AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto]) - AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) - AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) + AC_DEFINE(SISDRI,1,[Enable DRI driver support]) + AC_DEFINE(SIDDRI_DEVEL,1,[Enable developmental DRI driver support]) fi # technically this should be a configure flag. meh. @@ -181,7 +181,13 @@ #undef SISHAVEDRMWRITE #undef SISNEWDRI -#ifdef XF86DRI + +/* if the server was built without DRI support, force-disable DRI */ +#ifndef XF86DRI +#undef SISDRI +#endif + +#ifdef SISDRI #if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,2,99,3,0) #define SISHAVEDRMWRITE #endif @@ -195,7 +201,7 @@ #include "dri.h" #include "GL/glxint.h" #include "sis_dri.h" -#endif /* XF86DRI */ +#endif /* SISDRI */ /* Configurable stuff: ------------------------------------- */ @@ -812,7 +818,7 @@ typedef struct { ScrnInfoPtr pScrn_2; UChar *BIOS; struct SiS_Private *SiS_Pr; -#ifdef XF86DRI +#ifdef SISDRI SISAGPHTYPE agpHandle; ULong agpAddr; UChar *agpBase; @@ -1092,7 +1098,7 @@ typedef struct { unsigned int cmdQueueSize_div2; unsigned int cmdQueueSize_div4; unsigned int cmdQueueSize_4_3; -#ifdef XF86DRI +#ifdef SISDRI SISAGPHTYPE agpHandle; ULong agpAddr; UChar *agpBase; @@ -1151,7 +1157,7 @@ typedef struct { /* DRI */ Bool loadDRI; -#ifdef XF86DRI +#ifdef SISDRI Bool directRenderingEnabled; DRIInfoPtr pDRIInfo; int drmSubFD; diff --git a/src/sis_dri.c b/src/sis_dri.c index 97ed951..d0c4fba 100644 --- a/src/sis_dri.c +++ b/src/sis_dri.c @@ -369,7 +369,7 @@ SISDRIScreenInit(ScreenPtr pScreen) */ pDRIInfo->SAREASize = ((sizeof(XF86DRISAREARec) + getpagesize() - 1) & getpagesize()); /* round to page */ - /* ((sizeof(XF86DRISAREARec) + 0xfff) & 0x1000); */ /* round to page */ + /* ((sizeof(SISDRISAREARec) + 0xfff) & 0x1000); */ /* round to page */ /* + shared memory device private rec */ #else /* For now the mapping works by using a fixed size defined diff --git a/src/sis_driver.c b/src/sis_driver.c index 3218239..d733f48 100644 --- a/src/sis_driver.c +++ b/src/sis_driver.c @@ -90,7 +90,7 @@ #endif -#ifdef XF86DRI +#ifdef SISDRI #include "dri.h" #endif @@ -6895,7 +6895,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags) } /* Load the dri and glx modules if requested. */ -#ifdef XF86DRI +#ifdef SISDRI if(pSiS->loadDRI) { if(!xf86LoaderCheckSymbol("DRIScreenInit")) { if(xf86LoadSubModule(pScrn, "dri")) { @@ -8731,7 +8731,7 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pSiS->cmdQueueLen = 0; /* Force an EngineIdle() at start */ -#ifdef XF86DRI +#ifdef SISDRI if(pSiS->loadDRI) { #ifdef SISDUALHEAD /* No DRI in dual head mode */ @@ -9044,7 +9044,7 @@ SISScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } #endif -#ifdef XF86DRI +#ifdef SISDRI if(pSiS->loadDRI) { if(pSiS->directRenderingEnabled) { /* Now that mi, drm and others have done their thing, @@ -9778,7 +9778,7 @@ SISEnterVT(int scrnIndex, int flags) SISAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); -#ifdef XF86DRI +#ifdef SISDRI if(pSiS->directRenderingEnabled) { DRIUnlock(screenInfo.screens[scrnIndex]); } @@ -9804,7 +9804,7 @@ SISLeaveVT(int scrnIndex, int flags) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; SISPtr pSiS = SISPTR(pScrn); -#ifdef XF86DRI +#ifdef SISDRI ScreenPtr pScreen; if(pSiS->directRenderingEnabled) { @@ -9888,7 +9888,7 @@ SISCloseScreen(int scrnIndex, ScreenPtr pScreen) SiSCtrlExtUnregister(pSiS, pScrn->scrnIndex); } -#ifdef XF86DRI +#ifdef SISDRI if(pSiS->directRenderingEnabled) { SISDRICloseScreen(pScreen); pSiS->directRenderingEnabled = FALSE; diff --git a/src/sis_opt.c b/src/sis_opt.c index d39ff6e..3fa12c9 100644 --- a/src/sis_opt.c +++ b/src/sis_opt.c @@ -480,7 +480,7 @@ SiSOptions(ScrnInfoPtr pScrn) #endif pSiS->ShadowFB = FALSE; pSiS->loadDRI = FALSE; -#ifdef XF86DRI +#ifdef SISDRI pSiS->agpWantedPages = AGP_PAGES; #endif pSiS->VESA = -1; @@ -2034,7 +2034,7 @@ SiSOptions(ScrnInfoPtr pScrn) } } -#ifdef XF86DRI +#ifdef SISDRI /* DRI */ from = X_DEFAULT; if(xf86GetOptValBool(pSiS->Options, OPTION_DRI, &pSiS->loadDRI)) { |