summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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