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); }