summaryrefslogtreecommitdiff
path: root/src/glamo-driver.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-10-28 23:47:10 +0100
committerThomas White <taw@bitwiz.org.uk>2009-10-28 23:47:10 +0100
commita4692ac2d639a4a2a32e979ed0c47cbeb0800ada (patch)
treef2fe6a10c0ac067154ed3e8e3c2031ecdf546672 /src/glamo-driver.c
parent0a1c895dab15ef4dbd8f54adedb9be374b532040 (diff)
Make compilation of KMS parts optional
Configure with --enable-kms to enable the KMS parts. With this option, the driver will include both traditional (fbdev-based) and KMS drivers, and will choose between the two at runtime depending on the kernel. Without this option, the driver will be exactly as the traditional driver.
Diffstat (limited to 'src/glamo-driver.c')
-rw-r--r--src/glamo-driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glamo-driver.c b/src/glamo-driver.c
index 17b661e..283825e 100644
--- a/src/glamo-driver.c
+++ b/src/glamo-driver.c
@@ -325,6 +325,8 @@ GlamoFbdevProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections)
return foundScreen;
}
+#ifdef ENABLE_KMS
+
static Bool
GlamoKMSProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections)
{
@@ -367,6 +369,8 @@ GlamoKMSProbe(DriverPtr drv, GDevPtr *devSections, int numDevSections)
return foundScreen;
}
+#endif /* ENABLE_KMS */
+
static Bool
GlamoProbe(DriverPtr drv, int flags)
{
@@ -384,11 +388,15 @@ GlamoProbe(DriverPtr drv, int flags)
if (numDevSections <= 0) return FALSE;
/* Is today a good day to use KMS? */
+#ifdef ENABLE_KMS
if ( GlamoKernelModesettingAvailable() ) {
foundScreen = GlamoKMSProbe(drv, devSections, numDevSections);
} else {
foundScreen = GlamoFbdevProbe(drv, devSections, numDevSections);
}
+#else /* ENABLE_KMS */
+ foundScreen = GlamoFbdevProbe(drv, devSections, numDevSections);
+#endif /* ENABLE_KMS */
xfree(devSections);
TRACE("probe done");