From: kettenis Date: Thu, 13 Jun 2024 18:05:54 +0000 (+0000) Subject: Implement acpi_target_system_state(). X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0759fbd1d36fac3c24c345819ba57eb629d539c5;p=openbsd Implement acpi_target_system_state(). ok jsg@ --- diff --git a/sys/dev/pci/drm/drm_linux.c b/sys/dev/pci/drm/drm_linux.c index a2eded062e4..3204b4a0af5 100644 --- a/sys/dev/pci/drm/drm_linux.c +++ b/sys/dev/pci/drm/drm_linux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drm_linux.c,v 1.113 2024/06/03 12:48:25 claudio Exp $ */ +/* $OpenBSD: drm_linux.c,v 1.114 2024/06/13 18:05:54 kettenis Exp $ */ /* * Copyright (c) 2013 Jonathan Gray * Copyright (c) 2015, 2016 Mark Kettenis @@ -1521,6 +1521,12 @@ acpi_format_exception(acpi_status status) } } +int +acpi_target_system_state(void) +{ + return acpi_softc->sc_state; +} + #endif SLIST_HEAD(,backlight_device) backlight_device_list = diff --git a/sys/dev/pci/drm/include/generated/autoconf.h b/sys/dev/pci/drm/include/generated/autoconf.h index 87353a5065a..c251f618369 100644 --- a/sys/dev/pci/drm/include/generated/autoconf.h +++ b/sys/dev/pci/drm/include/generated/autoconf.h @@ -35,6 +35,7 @@ #include "acpi.h" #if NACPI > 0 #define CONFIG_ACPI 1 +#define CONFIG_ACPI_SLEEP 1 #endif #endif diff --git a/sys/dev/pci/drm/include/linux/acpi.h b/sys/dev/pci/drm/include/linux/acpi.h index c6514304106..b10d28eaba1 100644 --- a/sys/dev/pci/drm/include/linux/acpi.h +++ b/sys/dev/pci/drm/include/linux/acpi.h @@ -86,4 +86,6 @@ struct notifier_block; int register_acpi_notifier(struct notifier_block *); int unregister_acpi_notifier(struct notifier_block *); +int acpi_target_system_state(void); + #endif