xorg: Remove the XF86PM define.

We already have pm_noop.c being built most of the time for the
no-OS-PM case, so just switch to always using it.

Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Eric Anholt 2018-08-01 13:49:52 -07:00 committed by Adam Jackson
parent 708ddfbda1
commit accd32a466
7 changed files with 3 additions and 29 deletions

View File

@ -1915,9 +1915,6 @@ if test "x$XORG" = xyes; then
esac esac
dnl APM header dnl APM header
AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm]) 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*) freebsd* | kfreebsd*-gnu | dragonfly*)
XORG_OS_SUBDIR="bsd" XORG_OS_SUBDIR="bsd"
@ -1926,15 +1923,10 @@ if test "x$XORG" = xyes; then
XORG_OS_SUBDIR="bsd" XORG_OS_SUBDIR="bsd"
;; ;;
openbsd*) 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" XORG_OS_SUBDIR="bsd"
;; ;;
solaris*) solaris*)
XORG_OS_SUBDIR="solaris" XORG_OS_SUBDIR="solaris"
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
AC_CHECK_HEADERS([sys/kd.h]) AC_CHECK_HEADERS([sys/kd.h])
AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no])
# Check for minimum supported release # Check for minimum supported release

View File

@ -86,9 +86,7 @@
#include "xf86platformBus.h" #include "xf86platformBus.h"
#include "systemd-logind.h" #include "systemd-logind.h"
#ifdef XF86PM
extern void (*xf86OSPMClose) (void); extern void (*xf86OSPMClose) (void);
#endif
static void xf86VTSwitch(void); static void xf86VTSwitch(void);
@ -396,11 +394,9 @@ xf86VTLeave(void)
if (!xf86VTSwitchAway()) if (!xf86VTSwitchAway())
goto switch_failed; goto switch_failed;
#ifdef XF86PM
if (xf86OSPMClose) if (xf86OSPMClose)
xf86OSPMClose(); xf86OSPMClose();
xf86OSPMClose = NULL; xf86OSPMClose = NULL;
#endif
for (i = 0; i < xf86NumScreens; i++) { for (i = 0; i < xf86NumScreens; i++) {
/* /*
@ -456,9 +452,7 @@ xf86VTEnter(void)
if (!xf86VTSwitchTo()) if (!xf86VTSwitchTo())
return; return;
#ifdef XF86PM
xf86OSPMClose = xf86OSPMOpen(); xf86OSPMClose = xf86OSPMOpen();
#endif
if (xorgHWAccess) if (xorgHWAccess)
xf86EnableIO(); xf86EnableIO();

View File

@ -92,9 +92,7 @@
#endif #endif
#include <hotplug.h> #include <hotplug.h>
#ifdef XF86PM
void (*xf86OSPMClose) (void) = NULL; void (*xf86OSPMClose) (void) = NULL;
#endif
static Bool xorgHWOpenConsole = FALSE; static Bool xorgHWOpenConsole = FALSE;
/* Common pixmap formats */ /* Common pixmap formats */
@ -397,9 +395,7 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
} }
} }
#ifdef XF86PM
xf86OSPMClose = xf86OSPMOpen(); xf86OSPMClose = xf86OSPMOpen();
#endif
xf86ExtensionInit(); xf86ExtensionInit();
@ -626,7 +622,6 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
if (xorgHWOpenConsole) if (xorgHWOpenConsole)
xf86OpenConsole(); xf86OpenConsole();
#ifdef XF86PM
/* /*
should we reopen it here? We need to deal with an already opened 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 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(); xf86OSPMClose();
if ((xf86OSPMClose = xf86OSPMOpen()) != NULL) if ((xf86OSPMClose = xf86OSPMOpen()) != NULL)
xf86MsgVerb(X_INFO, 3, "APM registered successfully\n"); xf86MsgVerb(X_INFO, 3, "APM registered successfully\n");
#endif
/* Make sure full I/O access is enabled */ /* Make sure full I/O access is enabled */
if (xorgHWAccess) if (xorgHWAccess)
@ -878,11 +872,9 @@ ddxGiveUp(enum ExitCode error)
xf86VGAarbiterFini(); xf86VGAarbiterFini();
#ifdef XF86PM
if (xf86OSPMClose) if (xf86OSPMClose)
xf86OSPMClose(); xf86OSPMClose();
xf86OSPMClose = NULL; xf86OSPMClose = NULL;
#endif
for (i = 0; i < xf86NumScreens; i++) { for (i = 0; i < xf86NumScreens; i++) {
/* /*

View File

@ -45,6 +45,8 @@ if host_machine.system() == 'linux'
if build_acpi if build_acpi
srcs_xorg_os_support += 'linux/lnx_acpi.c' srcs_xorg_os_support += 'linux/lnx_acpi.c'
endif endif
else
srcs_xorg_os_support += 'shared/pm_noop.c'
endif endif
elif host_machine.system() == 'solaris' elif host_machine.system() == 'solaris'
@ -83,6 +85,7 @@ elif host_machine.system().endswith('bsd')
'bsd/bsd_VTsw.c', 'bsd/bsd_VTsw.c',
'bsd/bsd_bell.c', 'bsd/bsd_bell.c',
'bsd/bsd_init.c', 'bsd/bsd_init.c',
'shared/pm_noop.c',
] ]
# XXX: APM # XXX: APM

View File

@ -323,7 +323,6 @@ xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess'))
xorg_data.set_quoted('PCI_TXT_IDS_PATH', '') xorg_data.set_quoted('PCI_TXT_IDS_PATH', '')
xorg_data.set('XSERVER_PLATFORM_BUS', build_udev) 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('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.system() == 'freebsd' or host_machine.system() == 'dragonflybsd'
if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'

View File

@ -148,9 +148,6 @@
/* Define to 1 if you have the `seteuid' function. */ /* Define to 1 if you have the `seteuid' function. */
#undef HAVE_SETEUID #undef HAVE_SETEUID
/* Support APM/ACPI power management in the server */
#undef XF86PM
/* Fallback input driver if the assigned driver fails */ /* Fallback input driver if the assigned driver fails */
#undef FALLBACK_INPUT_DRIVER #undef FALLBACK_INPUT_DRIVER

View File

@ -142,9 +142,6 @@
/* Define to 1 if you have the `seteuid' function. */ /* Define to 1 if you have the `seteuid' function. */
#mesondefine HAVE_SETEUID #mesondefine HAVE_SETEUID
/* Support APM/ACPI power management in the server */
#mesondefine XF86PM
/* Fallback input driver if the assigned driver fails */ /* Fallback input driver if the assigned driver fails */
#mesondefine FALLBACK_INPUT_DRIVER #mesondefine FALLBACK_INPUT_DRIVER