summaryrefslogtreecommitdiff
path: root/src/legacy/i810/i810_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-24 21:40:44 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-24 21:40:44 +0000
commit85e48d2e5eb029d8c17714cb5e7db39ea06a2455 (patch)
tree4aba1de92f945a93b15169b80655f4facbcae562 /src/legacy/i810/i810_driver.c
parent96db90e819a1990c2d139725e522055e92def959 (diff)
legacy: Rename XF86DRI to HAVE_DRI1 to avoid conflicts with xorg-server.h
We use the XF86DRI as a user configurable option to control whether to build DRI support for i810, but it is also used internally within xorg and there exists a public define in xorg-server.h which overrides our configure option. So rename our define to HAVE_DRI1 to avoid the conflict. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46590 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/legacy/i810/i810_driver.c')
-rw-r--r--src/legacy/i810/i810_driver.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/legacy/i810/i810_driver.c b/src/legacy/i810/i810_driver.c
index d8f7c458..02da5744 100644
--- a/src/legacy/i810/i810_driver.c
+++ b/src/legacy/i810/i810_driver.c
@@ -71,7 +71,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i810.h"
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
#include "dri.h"
#endif
@@ -132,7 +132,7 @@ int I810_DEBUG = (0
);
#endif
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
static int i810_pitches[] = {
512,
1024,
@@ -352,7 +352,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
}
}
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
pI810->directRenderingDisabled =
!xf86ReturnOptValBool(pI810->Options, OPTION_DRI, TRUE);
@@ -551,7 +551,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
i = xf86ValidateModes(pScrn, pScrn->monitor->Modes,
pScrn->display->modes, clockRanges,
-#ifndef XF86DRI
+#ifndef HAVE_DRI1
0, 320, 1600, 64 * pScrn->bitsPerPixel,
#else
i810_pitches, 0, 0, 64 * pScrn->bitsPerPixel,
@@ -607,7 +607,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
pI810->allowPageFlip=FALSE;
enable = xf86ReturnOptValBool(pI810->Options, OPTION_PAGEFLIP, FALSE);
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (!pI810->directRenderingDisabled) {
pI810->allowPageFlip = enable;
if (pI810->allowPageFlip == TRUE)
@@ -645,7 +645,7 @@ I810PreInit(ScrnInfoPtr pScrn, int flags)
pI810->numSurfaces = 0;
}
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
/* Load the dri module if requested. */
if (xf86ReturnOptValBool(pI810->Options, OPTION_DRI, FALSE)) {
xf86LoadSubModule(pScrn, "dri");
@@ -1351,7 +1351,7 @@ I810ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
if (!I810SetMode(pScrn, mode))
return FALSE;
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
DRILock(screenInfo.screens[pScrn->scrnIndex], 0);
pI810->LockHeld = 1;
@@ -1360,7 +1360,7 @@ I810ModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
DoRestore(pScrn, &hwp->ModeReg, &pI810->ModeReg, FALSE);
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
pI810->LockHeld = 0;
@@ -1610,7 +1610,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* memory. Wonder if this is going to be a problem...
*/
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
/*
* Setup DRI after visuals have been established, but before fbScreenInit
* is called. fbScreenInit will eventually call into the drivers
@@ -1676,7 +1676,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86SetBlackWhitePixels(pScreen);
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->LpRing->mem.Start == 0 && pI810->directRenderingEnabled) {
pI810->directRenderingEnabled = FALSE;
I810DRICloseScreen(pScreen);
@@ -1753,7 +1753,7 @@ I810ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
I810InitVideo(pScreen);
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
/* Now that mi, fb, drm and others have done their thing,
* complete the DRI setup.
@@ -1803,7 +1803,7 @@ I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
* If lockups on mode switch are still seen revisit this code. (EE)
*/
-# ifdef XF86DRI
+# ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
if (I810_DEBUG & DEBUG_VERBOSE_DRI)
ErrorF("calling dri lock\n");
@@ -1818,7 +1818,7 @@ I810SwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
}
I810Restore(pScrn);
-# ifdef XF86DRI
+# ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
if (!I810DRILeave(pScrn))
return FALSE;
@@ -1892,7 +1892,7 @@ I810EnterVT(int scrnIndex, int flags)
{
ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
I810Ptr pI810 = I810PTR(pScrn);
#endif
@@ -1902,7 +1902,7 @@ I810EnterVT(int scrnIndex, int flags)
if (!I810BindGARTMemory(pScrn)) {
return FALSE;
}
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (!I810DRIEnter(pScrn)) {
return FALSE;
}
@@ -1930,7 +1930,7 @@ I810LeaveVT(int scrnIndex, int flags)
if (I810_DEBUG & DEBUG_VERBOSE_DRI)
ErrorF("\n\n\nLeave VT\n");
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
if (I810_DEBUG & DEBUG_VERBOSE_DRI)
ErrorF("calling dri lock\n");
@@ -1948,7 +1948,7 @@ I810LeaveVT(int scrnIndex, int flags)
if (!I810UnbindGARTMemory(pScrn))
return;
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (!I810DRILeave(pScrn))
return;
#endif
@@ -1973,7 +1973,7 @@ I810CloseScreen(int scrnIndex, ScreenPtr pScreen)
I810Restore(pScrn);
vgaHWLock(hwp);
}
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
I810DRICloseScreen(pScreen);
pI810->directRenderingEnabled = FALSE;