[PATCH 17/54] Move DBE from an external module to built-in

Daniel Stone daniel at fooishbar.org
Mon Jul 9 18:03:01 PDT 2012


From: Tomas Carnecky <tom at dbservice.com>

If DBE support is compiled in the server, just man up and build it into
the server, rather than having it as an external module.

Signed-off-by: Tomas Carnecky <tom at dbservice.com>
Reviewed-by: Daniel Stone <daniel at fooishbar.org>
Reviewed-by: Jamey Sharp <jamey at minilop.net>
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 configure.ac                   |    5 +++--
 hw/xfree86/common/xf86Config.c |    3 ---
 hw/xfree86/dixmods/Makefile.am |   10 ---------
 hw/xfree86/dixmods/dbemodule.c |   44 ----------------------------------------
 hw/xfree86/loader/loadmod.c    |    1 +
 hw/xfree86/sdksyms.sh          |    4 ++--
 include/extinit.h              |    2 +-
 mi/miinitext.c                 |    3 +++
 8 files changed, 10 insertions(+), 62 deletions(-)
 delete mode 100644 hw/xfree86/dixmods/dbemodule.c

diff --git a/configure.ac b/configure.ac
index 74e7e9a..13628f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1173,6 +1173,7 @@ AM_CONDITIONAL(DBE, [test "x$DBE" = xyes])
 if test "x$DBE" = xyes; then
 	AC_DEFINE(DBE, 1, [Support DBE extension])
 	DBE_LIB='$(top_builddir)/dbe/libdbe.la'
+	DBE_INC='-I$(top_srcdir)/dbe'
 fi
 
 AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes])
@@ -1545,7 +1546,7 @@ AC_EGREP_CPP([I_AM_SVR4],[
 AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4])
 AC_MSG_RESULT([yes])], AC_MSG_RESULT([no]))
 
-XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC"
+XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC"
 
 dnl ---------------------------------------------------------------------------
 dnl DDX section.
@@ -1604,7 +1605,7 @@ if test "x$XORG" = xyes; then
 	XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
 	XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
 	XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
-	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
+	XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXTXORG_LIB $DBE_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB"
 
 	dnl ==================================================================
 	dnl symbol visibility
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 6b806a3..ce2c10a 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -110,9 +110,6 @@
 
 static ModuleDefault ModuleDefaults[] = {
     {.name = "extmod",.toLoad = TRUE,.load_opt = NULL},
-#ifdef DBE
-    {.name = "dbe",.toLoad = TRUE,.load_opt = NULL},
-#endif
 #ifdef GLXEXT
     {.name = "glx",.toLoad = TRUE,.load_opt = NULL},
 #endif
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 6f4af6c..827b952 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -6,10 +6,6 @@ if GLX
 GLXMODS = libglx.la
 endif
 
-if DBE
-DBEMOD = libdbe.la
-endif
-
 if RECORD
 RECORDMOD = librecord.la
 endif
@@ -20,20 +16,14 @@ module_LTLIBRARIES = libfb.la \
 
 extsmoduledir = $(moduledir)/extensions
 extsmodule_LTLIBRARIES = $(RECORDMOD) \
-			 $(DBEMOD) \
                          $(GLXMODS)
 
 AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
 INCLUDES = @XORG_INCS@ \
-           -I$(top_srcdir)/dbe \
            -I$(top_srcdir)/hw/xfree86/loader \
            -I$(top_srcdir)/miext/shadow \
            -I$(top_srcdir)/glx
 
-libdbe_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
-libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la
-libdbe_la_SOURCES = dbemodule.c
-
 libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
 libfb_la_LIBADD = $(top_builddir)/fb/libfb.la
 libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c
diff --git a/hw/xfree86/dixmods/dbemodule.c b/hw/xfree86/dixmods/dbemodule.c
deleted file mode 100644
index fb37053..0000000
--- a/hw/xfree86/dixmods/dbemodule.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifdef HAVE_XORG_CONFIG_H
-#include <xorg-config.h>
-#endif
-
-#include "xf86Module.h"
-#include "globals.h"
-#include "extinit.h"
-
-static MODULESETUPPROTO(dbeSetup);
-
-static ExtensionModule dbeExt = {
-    DbeExtensionInit,
-    "DOUBLE-BUFFER",
-    &noDbeExtension,
-    NULL,
-    NULL
-};
-
-static XF86ModuleVersionInfo VersRec = {
-    "dbe",
-    MODULEVENDORSTRING,
-    MODINFOSTRING1,
-    MODINFOSTRING2,
-    XORG_VERSION_CURRENT,
-    1, 0, 0,
-    ABI_CLASS_EXTENSION,
-    ABI_EXTENSION_VERSION,
-    MOD_CLASS_EXTENSION,
-    {0, 0, 0, 0}
-};
-
-/*
- * Data for the loader
- */
-_X_EXPORT XF86ModuleData dbeModuleData = { &VersRec, dbeSetup, NULL };
-
-static pointer
-dbeSetup(pointer module, pointer opts, int *errmaj, int *errmin)
-{
-    LoadExtension(&dbeExt, FALSE);
-
-    /* Need a non-NULL return value to indicate success */
-    return (pointer) 1;
-}
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index e7e60dd..99f06c2 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -833,6 +833,7 @@ static const char *compiled_in_modules[] = {
     "ddc",
     "i2c",
     "ramdac",
+    "dbe",
     NULL
 };
 
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 81dbbe2..ab48fcf 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -241,9 +241,9 @@ cat > sdksyms.c << EOF
 
 
 /* dbe/Makefile.am -- module */
-/*
+#ifdef DBE
 #include "dbestruct.h"
- */
+#endif
 
 
 /* exa/Makefile.am -- module */
diff --git a/include/extinit.h b/include/extinit.h
index 5e01128..539e28d 100644
--- a/include/extinit.h
+++ b/include/extinit.h
@@ -63,7 +63,7 @@ extern Bool noDamageExtension;
 extern void DamageExtensionInit(void);
 #endif
 
-#if defined(DBE) && !defined(XorgLoader)
+#if defined(DBE)
 extern Bool noDbeExtension;
 extern void DbeExtensionInit(void);
 #endif
diff --git a/mi/miinitext.c b/mi/miinitext.c
index c4749f5..09a815a 100644
--- a/mi/miinitext.c
+++ b/mi/miinitext.c
@@ -397,6 +397,9 @@ static ExtensionModule staticExtensions[] = {
 #ifdef DAMAGE
     {DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL},
 #endif
+#ifdef DBE
+    {DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension, NULL},
+#endif
 };
 
  /*ARGSUSED*/ void
-- 
1.7.10.4



More information about the xorg-devel mailing list