diff --git a/configure.ac b/configure.ac index e0ebc78a1..350c89a3b 100644 --- a/configure.ac +++ b/configure.ac @@ -1915,9 +1915,6 @@ if test "x$XORG" = xyes; then esac dnl APM header AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm]) - if test "x$linux_apm" = xyes -o "x$linux_acpi" = xyes; then - AC_DEFINE(XF86PM, 1, [Support APM/ACPI power management in the server]) - fi ;; freebsd* | kfreebsd*-gnu | dragonfly*) XORG_OS_SUBDIR="bsd" @@ -1926,15 +1923,10 @@ if test "x$XORG" = xyes; then XORG_OS_SUBDIR="bsd" ;; openbsd*) - if test "x$ac_cv_BSD_APM" = xyes \ - -o "x$ac_cv_BSD_KQUEUE_APM" = xyes; then - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" - fi XORG_OS_SUBDIR="bsd" ;; solaris*) XORG_OS_SUBDIR="solaris" - XORG_CFLAGS="$XORG_CFLAGS -DXF86PM" AC_CHECK_HEADERS([sys/kd.h]) AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) # Check for minimum supported release diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 8a800bd8f..455a0eccb 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -86,9 +86,7 @@ #include "xf86platformBus.h" #include "systemd-logind.h" -#ifdef XF86PM extern void (*xf86OSPMClose) (void); -#endif static void xf86VTSwitch(void); @@ -396,11 +394,9 @@ xf86VTLeave(void) if (!xf86VTSwitchAway()) goto switch_failed; -#ifdef XF86PM if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; -#endif for (i = 0; i < xf86NumScreens; i++) { /* @@ -456,9 +452,7 @@ xf86VTEnter(void) if (!xf86VTSwitchTo()) return; -#ifdef XF86PM xf86OSPMClose = xf86OSPMOpen(); -#endif if (xorgHWAccess) xf86EnableIO(); diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 3c5cc7097..8773a47e8 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -92,9 +92,7 @@ #endif #include -#ifdef XF86PM void (*xf86OSPMClose) (void) = NULL; -#endif static Bool xorgHWOpenConsole = FALSE; /* Common pixmap formats */ @@ -397,9 +395,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) } } -#ifdef XF86PM xf86OSPMClose = xf86OSPMOpen(); -#endif xf86ExtensionInit(); @@ -626,7 +622,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (xorgHWOpenConsole) xf86OpenConsole(); -#ifdef XF86PM /* should we reopen it here? We need to deal with an already opened device. We could leave this to the OS layer. For now we simply @@ -636,7 +631,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) xf86OSPMClose(); if ((xf86OSPMClose = xf86OSPMOpen()) != NULL) xf86MsgVerb(X_INFO, 3, "APM registered successfully\n"); -#endif /* Make sure full I/O access is enabled */ if (xorgHWAccess) @@ -878,11 +872,9 @@ ddxGiveUp(enum ExitCode error) xf86VGAarbiterFini(); -#ifdef XF86PM if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; -#endif for (i = 0; i < xf86NumScreens; i++) { /* diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index b6e5c975d..0e021dbe1 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -45,6 +45,8 @@ if host_machine.system() == 'linux' if build_acpi srcs_xorg_os_support += 'linux/lnx_acpi.c' endif + else + srcs_xorg_os_support += 'shared/pm_noop.c' endif elif host_machine.system() == 'solaris' @@ -83,6 +85,7 @@ elif host_machine.system().endswith('bsd') 'bsd/bsd_VTsw.c', 'bsd/bsd_bell.c', 'bsd/bsd_init.c', + 'shared/pm_noop.c', ] # XXX: APM diff --git a/include/meson.build b/include/meson.build index 81a48af96..6ed7cc6ca 100644 --- a/include/meson.build +++ b/include/meson.build @@ -323,7 +323,6 @@ xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess')) xorg_data.set_quoted('PCI_TXT_IDS_PATH', '') xorg_data.set('XSERVER_PLATFORM_BUS', build_udev) xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd') -xorg_data.set('XF86PM', build_apm or build_acpi) if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonflybsd' if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index bf555eb95..e3000274d 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -148,9 +148,6 @@ /* Define to 1 if you have the `seteuid' function. */ #undef HAVE_SETEUID -/* Support APM/ACPI power management in the server */ -#undef XF86PM - /* Fallback input driver if the assigned driver fails */ #undef FALLBACK_INPUT_DRIVER diff --git a/include/xorg-config.h.meson.in b/include/xorg-config.h.meson.in index 1e4213f9a..59f1c2a8d 100644 --- a/include/xorg-config.h.meson.in +++ b/include/xorg-config.h.meson.in @@ -142,9 +142,6 @@ /* Define to 1 if you have the `seteuid' function. */ #mesondefine HAVE_SETEUID -/* Support APM/ACPI power management in the server */ -#mesondefine XF86PM - /* Fallback input driver if the assigned driver fails */ #mesondefine FALLBACK_INPUT_DRIVER