summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2009-01-05 11:23:39 +0200
committerDaniel Stone <daniel@fooishbar.org>2009-01-05 11:23:39 +0200
commit7da4e901e078e5597b8dbcb7ee39b949edf7ef03 (patch)
tree8661c0ebf6da06ffe6f9b1227fb3f25572153071
parent13ce7b98d48261b061da5768a6405bdbe9caa1fb (diff)
XFree86: Fix build with DGA disabled
It's optional, so we might as well work when it's disabled. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--hw/xfree86/common/Makefile.am4
-rw-r--r--hw/xfree86/common/xf86Init.c2
-rw-r--r--hw/xfree86/modes/Makefile.am8
-rw-r--r--hw/xfree86/modes/xf86Crtc.h2
-rw-r--r--hw/xfree86/modes/xf86RandR12.c4
5 files changed, 18 insertions, 2 deletions
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index d49ef6f1c..2c1234c71 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -13,6 +13,10 @@ if XF86VIDMODE
XF86VMODE_SDK = vidmodeproc.h
endif
+if DGA
+DGASOURCES = xf86DGA.c
+endif
+
XISOURCES = xf86Xinput.c xisb.c
XISDKINCS = xf86Xinput.h xisb.h
RANDRSOURCES = xf86RandR.c
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 918acb9cf..542695c25 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1220,7 +1220,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
* don't, will wrap them.
*/
xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess;
+#ifdef XFreeXDGA
xf86Screens[i]->SetDGAMode = xf86SetDGAMode;
+#endif
xf86Screens[i]->DPMSSet = NULL;
xf86Screens[i]->LoadPalette = NULL;
xf86Screens[i]->SetOverscan = NULL;
diff --git a/hw/xfree86/modes/Makefile.am b/hw/xfree86/modes/Makefile.am
index 5cd926fdf..dc090cf75 100644
--- a/hw/xfree86/modes/Makefile.am
+++ b/hw/xfree86/modes/Makefile.am
@@ -1,19 +1,23 @@
noinst_LTLIBRARIES = libxf86modes.la
+if DGA
+DGA_SRCS = xf86DiDGA.c
+endif
+
libxf86modes_la_SOURCES = \
xf86Crtc.c \
xf86Crtc.h \
xf86Cursors.c \
xf86cvt.c \
xf86gtf.c \
- xf86DiDGA.c \
xf86EdidModes.c \
xf86Modes.c \
xf86Modes.h \
xf86RandR12.c \
xf86RandR12.h \
xf86Rename.h \
- xf86Rotate.c
+ xf86Rotate.c \
+ $(DGA_SRCS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h
index c269f7b09..9a1850106 100644
--- a/hw/xfree86/modes/xf86Crtc.h
+++ b/hw/xfree86/modes/xf86Crtc.h
@@ -825,6 +825,7 @@ xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus);
* Initialize dga for this screen
*/
+#ifdef XFreeXDGA
extern _X_EXPORT Bool
xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
@@ -834,6 +835,7 @@ xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address);
extern _X_EXPORT Bool
xf86DiDGAReInit (ScreenPtr pScreen);
+#endif
/*
* Set the subpixel order reported for the screen using
diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c
index 8c4a1fb5b..13f6310a9 100644
--- a/hw/xfree86/modes/xf86RandR12.c
+++ b/hw/xfree86/modes/xf86RandR12.c
@@ -248,7 +248,9 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations)
{
xf86ProbeOutputModes (scrp, 0, 0);
xf86SetScrnInfoModes (scrp);
+#ifdef XFreeXDGA
xf86DiDGAReInit (pScreen);
+#endif
}
for (mode = scrp->modes; ; mode = mode->next)
@@ -1317,7 +1319,9 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations)
return TRUE;
xf86ProbeOutputModes (pScrn, 0, 0);
xf86SetScrnInfoModes (pScrn);
+#ifdef XFreeXDGA
xf86DiDGAReInit (pScreen);
+#endif
return xf86RandR12SetInfo12 (pScreen);
}