summaryrefslogtreecommitdiff
path: root/src/legacy
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
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')
-rw-r--r--src/legacy/i810/i810.h6
-rw-r--r--src/legacy/i810/i810_accel.c4
-rw-r--r--src/legacy/i810/i810_driver.c36
3 files changed, 23 insertions, 23 deletions
diff --git a/src/legacy/i810/i810.h b/src/legacy/i810/i810.h
index 183c7016..2c0b53e3 100644
--- a/src/legacy/i810/i810.h
+++ b/src/legacy/i810/i810.h
@@ -51,7 +51,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xorg-server.h"
#include <pciaccess.h>
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
#include "xf86drm.h"
#include "sarea.h"
#define _XF86DRI_SERVER_
@@ -209,7 +209,7 @@ typedef struct _I810Rec {
Bool directRenderingDisabled; /* DRI disabled in PreInit */
Bool directRenderingEnabled; /* false if XF86DRI not defined. */
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
int LockHeld;
DRIInfoPtr pDRIInfo;
int drmSubFD;
@@ -248,7 +248,7 @@ typedef struct _I810Rec {
#define I810_SELECT_BACK 1
#define I810_SELECT_DEPTH 2
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
extern Bool I810DRIScreenInit(ScreenPtr pScreen);
extern void I810DRICloseScreen(ScreenPtr pScreen);
extern Bool I810DRIFinishScreenInit(ScreenPtr pScreen);
diff --git a/src/legacy/i810/i810_accel.c b/src/legacy/i810/i810_accel.c
index 9aa3e42c..6b57dbb1 100644
--- a/src/legacy/i810/i810_accel.c
+++ b/src/legacy/i810/i810_accel.c
@@ -213,7 +213,7 @@ I810WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis)
start);
I810PrintErrorState(pScrn);
ErrorF("space: %d wanted %d\n", ring->space, n);
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
if (pI810->directRenderingEnabled) {
DRIUnlock(screenInfo.screens[pScrn->scrnIndex]);
DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]);
@@ -245,7 +245,7 @@ I810Sync(ScrnInfoPtr pScrn)
if (I810_DEBUG & (DEBUG_VERBOSE_ACCEL | DEBUG_VERBOSE_SYNC))
ErrorF("I810Sync\n");
-#ifdef XF86DRI
+#ifdef HAVE_DRI1
/* VT switching tries to do this.
*/
if (!pI810->LockHeld && pI810->directRenderingEnabled) {
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;