Commit accd32a4 authored by Eric Anholt's avatar Eric Anholt Committed by Adam Jackson

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's avatarEric Anholt <eric@anholt.net>
Reviewed-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 708ddfbd
......@@ -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
......
......@@ -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();
......
......@@ -92,9 +92,7 @@
#endif
#include <hotplug.h>
#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++) {
/*
......
......@@ -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
......
......@@ -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'
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment