summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-23 13:40:04 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-23 13:41:55 +0100
commit9326acc2917109f06dda809107c8fa5a2273c3d2 (patch)
tree6f22af106f3ee776eddf23f0251ad643fb1b2340
parent0afb7efe8c48b5fc839e2137e870bea0f5fb3c9c (diff)
Allow compilation of a separate i810 driver
Allow --enable-ums-only as a counter-option to --enable-kms-only in case the distribution wishes to enable a non-root KMS driver but also offer a separate UMS driver for i81x. On the second pass, use "--enable-ums-only --disable-uxa --disable-sna" to get the trimmed down unaccelerated i810 support. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--configure.ac14
-rw-r--r--src/intel_module.c16
2 files changed, 24 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 6b0b0a8b..1cd5a92c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,6 +125,10 @@ AC_ARG_ENABLE(kms-only, AS_HELP_STRING([--enable-kms-only],
[Assume KMS support [[default=no]]]),
[KMS_ONLY="$enableval"],
[KMS_ONLY=no])
+AC_ARG_ENABLE(ums-only, AS_HELP_STRING([--enable-ums-only],
+ [Assume only UMS (no KMS) support [[default=no]]]),
+ [UMS_ONLY="$enableval"],
+ [UMS_ONLY=no])
required_xorg_xserver_version=1.6
required_pixman_version=0.24
@@ -230,12 +234,12 @@ if test "x$accel" = xauto; then
accel=sna
fi
fi
- if test "x$accel" = xauto; then
+ if test "x$accel" = xauto -a "x$UMS_ONLY" != "xyes"; then
AC_MSG_ERROR([No default acceleration option])
fi
fi
-have_accel=no
+have_accel=none
if test "x$accel" = xsna; then
if test "x$SNA" != "xno"; then
AC_DEFINE(DEFAULT_ACCEL_METHOD, SNA, [Default acceleration method])
@@ -254,7 +258,7 @@ if test "x$accel" = xuxa; then
fi
fi
AC_MSG_RESULT($accel)
-if test "x$accel" = xno; then
+if test "x$accel" = xnone -a "x$UMS_ONLY" != "xyes"; then
AC_MSG_ERROR([No default acceleration option])
fi
@@ -361,6 +365,10 @@ AM_CONDITIONAL(KMS_ONLY, test x$KMS_ONLY = xyes)
if test "x$KMS_ONLY" = xyes; then
AC_DEFINE(KMS_ONLY,1,[Assume KMS support])
fi
+AM_CONDITIONAL(UMS_ONLY, test x$UMS_ONLY = xyes)
+if test "x$UMS_ONLY" = xyes; then
+ AC_DEFINE(UMS_ONLY,1,[Assume only UMS (no KMS) support])
+fi
AM_CONDITIONAL(DEBUG, test x$DEBUG != xno)
AM_CONDITIONAL(FULL_DEBUG, test x$FULL_DEBUG == xfull)
diff --git a/src/intel_module.c b/src/intel_module.c
index bc0b6d25..7de9da7e 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -214,6 +214,7 @@ static const struct pci_id_match intel_device_match[] = {
INTEL_DEVICE_MATCH (PCI_CHIP_I815, &intel_i81x_info ),
#endif
+#if !UMS_ONLY
INTEL_DEVICE_MATCH (PCI_CHIP_I830_M, &intel_i830_info ),
INTEL_DEVICE_MATCH (PCI_CHIP_845_G, &intel_i845_info ),
INTEL_DEVICE_MATCH (PCI_CHIP_I854, &intel_i855_info ),
@@ -309,6 +310,8 @@ static const struct pci_id_match intel_device_match[] = {
INTEL_DEVICE_MATCH (PCI_CHIP_VALLEYVIEW_PO, &intel_valleyview_info ),
INTEL_DEVICE_MATCH (PCI_MATCH_ANY, &intel_generic_info ),
+#endif
+
{ 0, 0, 0 },
};
@@ -422,6 +425,7 @@ static Bool has_kernel_mode_setting(struct pci_device *dev)
return ret;
}
+#if !UMS_ONLY
extern XF86ConfigPtr xf86configptr;
static XF86ConfDevicePtr
@@ -459,6 +463,7 @@ static enum accel_method { UXA, SNA } get_accel_method(void)
return accel_method;
}
+#endif
/*
* intel_pci_probe --
@@ -523,6 +528,7 @@ static Bool intel_pci_probe(DriverPtr driver,
}
#endif
+#if !UMS_ONLY
switch (get_accel_method()) {
#if USE_SNA
case SNA: return sna_init_scrn(scrn, entity_num);
@@ -531,9 +537,10 @@ static Bool intel_pci_probe(DriverPtr driver,
#if USE_UXA
case UXA: return intel_init_scrn(scrn);
#endif
-
- default: return FALSE;
}
+#endif
+
+ return FALSE;
}
#ifdef XSERVER_PLATFORM_BUS
@@ -577,6 +584,7 @@ intel_platform_probe(DriverPtr driver,
xf86DrvMsg(scrn->scrnIndex, X_INFO,
"using device path '%s'\n", path ? path : "Default device");
+#if !UMS_ONLY
switch (get_accel_method()) {
#if USE_SNA
case SNA: return sna_init_scrn(scrn, entity_num);
@@ -584,8 +592,10 @@ intel_platform_probe(DriverPtr driver,
#if USE_UXA
case UXA: return intel_init_scrn(scrn);
#endif
- default: return FALSE;
}
+#endif
+
+ return FALSE;
}
#endif