summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-14 20:36:09 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-11-14 20:36:09 -0200
commitcd10af22240b9df7c264b15c483d8cc4505ee359 (patch)
treeec41312655a3e06a04f2a8ba5c248e1e4e57cd35
parent41ef793b0ed6014ed49bef011259f977833aef5d (diff)
Only compile smi_dga.c when xf86DiDGAInit is not available.
Besides reducing driver size, this should make DGA+EXA accelerated.
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am5
-rw-r--r--src/smi.h2
-rw-r--r--src/smi_driver.c10
4 files changed, 14 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 436a241..a42c14a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-AM_CONDITIONAL(XMODES, test "x$XMODES" = xno)
+AM_CONDITIONAL(XMODES, test "x$XMODES" = xyes)
if test "x$XMODES" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS -DHAVE_XMODES"
diff --git a/src/Makefile.am b/src/Makefile.am
index 87ca97f..5170211 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -36,7 +36,6 @@ siliconmotion_drv_la_SOURCES = \
smi_xaa.c \
smi_exa.c \
smi_dac.c \
- smi_dga.c \
smi_driver.c \
smi.h \
smi_i2c.c \
@@ -52,3 +51,7 @@ siliconmotion_drv_la_SOURCES = \
smilynx.h \
smi501_crtc.c \
smi501_output.c
+
+if !XMODES
+siliconmotion_drv_la_SOURCES += smi_dga.c
+endif
diff --git a/src/smi.h b/src/smi.h
index 66d28df..76de956 100644
--- a/src/smi.h
+++ b/src/smi.h
@@ -390,8 +390,10 @@ void SMI_LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies,
xf86MonPtr SMI_ddc1(ScrnInfoPtr pScrn);
void SMI_PrintRegs(ScrnInfoPtr pScrn);
+#ifndef HAVE_XMODES
/* smi_dga.c */
Bool SMI_DGAInit(ScreenPtr pScrn);
+#endif
/* smi_video.c */
void SMI_InitVideo(ScreenPtr pScreen);
diff --git a/src/smi_driver.c b/src/smi_driver.c
index c7c18f3..8b6e78b 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -1716,11 +1716,15 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
SMI_PrintRegs(pScrn);
miInitializeBackingStore(pScreen);
-
+
+#ifdef HAVE_XMODES
+ xf86DiDGAInit(pScreen, (unsigned long)(pSmi->FBBase + pScrn->fbOffset));
+#else
/* hardware cursor needs to wrap this layer */
- if(!pSmi->NoAccel && !pSmi->useEXA)
+ if (!pSmi->NoAccel && !pSmi->useEXA)
SMI_DGAInit(pScreen);
-
+#endif
+
/* Initialise cursor functions */
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());