From e2c64551808988657069006f74c6780973ec0557 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 15 Sep 2009 21:13:48 -0700 Subject: Add configuration option for use of SIGIO handlers for input events Boolean option to enable/disable SIGIO handlers is set by the first of these found: - UseSIGIO option is set in xorg.conf ServerFlags - Default set at build time by ./configure --enable-use-sigio-by-default - Platform default value: Solaris = no, all others = yes This matches the current settings on all platforms except Solaris. This reverts Solaris (for now) to the settings used in Xorg 1.6, before SIGIO support for Solaris was added, due to some system level bugs that won't be resolved in time for Xorg 1.7 release, but allows us to enable when those are resolved (or when we need to test if they're resolved). See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897 Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer --- hw/xfree86/common/xf86Config.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'hw/xfree86/common/xf86Config.c') diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 82c39939e..0605f37e0 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -708,6 +708,7 @@ typedef enum { FLAG_AUTO_ENABLE_DEVICES, FLAG_GLX_VISUALS, FLAG_DRI2, + FLAG_USE_SIGIO } FlagValues; static OptionInfoRec FlagOptions[] = { @@ -765,6 +766,8 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_DRI2, "DRI2", OPTV_BOOLEAN, {0}, FALSE }, + { FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN, + {0}, USE_SIGIO_BY_DEFAULT }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -832,6 +835,22 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); } + if (xf86SIGIOSupported()) { + xf86GetOptValBool(FlagOptions, FLAG_USE_SIGIO, &xf86Info.useSIGIO); + if (xf86IsOptionSet(FlagOptions, FLAG_USE_SIGIO)) { + from = X_CONFIG; + } else { + from = X_DEFAULT; + } + if (!xf86Info.useSIGIO) { + xf86Msg(from, "Disabling SIGIO handlers for input devices\n"); + } else if (from == X_CONFIG) { + xf86Msg(from, "Enabling SIGIO handlers for input devices\n"); + } + } else { + xf86Info.useSIGIO = FALSE; + } + if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); -- cgit v1.2.3