From: Seth Forshee <seth.forshee@canonical.com>
To: linux-acpi@vger.kernel.org
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
Len Brown <lenb@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
Ben Jencks <ben@bjencks.net>, joeyli <jlee@suse.com>,
Seth Forshee <seth.forshee@canonical.com>
Subject: [PATCH 1/5] ACPICA: Add interface for getting latest Windows version requested via _OSI
Date: Thu, 7 Mar 2013 13:39:36 -0600 [thread overview]
Message-ID: <1362685180-7768-1-git-send-email-seth.forshee@canonical.com> (raw)
In-Reply-To: <20130307193812.GD24233@thinkpad-t410>
The acpi_video driver needs to know the latest Windows version requested
by the BIOS to work around a buggy backlight implementation which is
specific to Windows 8. Add a new interface named
acpi_osi_windows_version() for retrieving this information.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
drivers/acpi/acpica/aclocal.h | 13 -------------
drivers/acpi/acpica/utxface.c | 19 +++++++++++++++++++
include/acpi/acpixf.h | 18 ++++++++++++++++++
3 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index ff8bd00..932c3d8 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -926,19 +926,6 @@ struct acpi_bit_register_info {
/* Structs and definitions for _OSI support and I/O port validation */
-#define ACPI_OSI_WIN_2000 0x01
-#define ACPI_OSI_WIN_XP 0x02
-#define ACPI_OSI_WIN_XP_SP1 0x03
-#define ACPI_OSI_WINSRV_2003 0x04
-#define ACPI_OSI_WIN_XP_SP2 0x05
-#define ACPI_OSI_WINSRV_2003_SP1 0x06
-#define ACPI_OSI_WIN_VISTA 0x07
-#define ACPI_OSI_WINSRV_2008 0x08
-#define ACPI_OSI_WIN_VISTA_SP1 0x09
-#define ACPI_OSI_WIN_VISTA_SP2 0x0A
-#define ACPI_OSI_WIN_7 0x0B
-#define ACPI_OSI_WIN_8 0x0C
-
#define ACPI_ALWAYS_ILLEGAL 0x00
struct acpi_interface_info {
diff --git a/drivers/acpi/acpica/utxface.c b/drivers/acpi/acpica/utxface.c
index 390db0c..1531984 100644
--- a/drivers/acpi/acpica/utxface.c
+++ b/drivers/acpi/acpica/utxface.c
@@ -384,6 +384,25 @@ ACPI_EXPORT_SYMBOL(acpi_install_interface_handler)
/*****************************************************************************
*
+ * FUNCTION: acpi_osi_windows_version
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Latest Windows version Windows requested via _OSI
+ *
+ * DESCRIPTION: Returns the latest version of Windows that has been requested
+ * by the BIOS via _OSI.
+ *
+ ****************************************************************************/
+u8 acpi_osi_windows_version(void)
+{
+ return acpi_gbl_osi_data;
+}
+
+ACPI_EXPORT_SYMBOL(acpi_osi_windows_version)
+
+/*****************************************************************************
+ *
* FUNCTION: acpi_check_address_range
*
* PARAMETERS: space_id - Address space ID
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 3d88395..29a9429 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -73,6 +73,22 @@ extern u8 acpi_gbl_truncate_io_addresses;
extern u8 acpi_gbl_disable_auto_repair;
/*
+ * Values returned by acpi_osi_windows_version()
+ */
+#define ACPI_OSI_WIN_2000 0x01
+#define ACPI_OSI_WIN_XP 0x02
+#define ACPI_OSI_WIN_XP_SP1 0x03
+#define ACPI_OSI_WINSRV_2003 0x04
+#define ACPI_OSI_WIN_XP_SP2 0x05
+#define ACPI_OSI_WINSRV_2003_SP1 0x06
+#define ACPI_OSI_WIN_VISTA 0x07
+#define ACPI_OSI_WINSRV_2008 0x08
+#define ACPI_OSI_WIN_VISTA_SP1 0x09
+#define ACPI_OSI_WIN_VISTA_SP2 0x0A
+#define ACPI_OSI_WIN_7 0x0B
+#define ACPI_OSI_WIN_8 0x0C
+
+/*
* Hardware-reduced prototypes. All interfaces that use these macros will
* be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
* is set to TRUE.
@@ -301,6 +317,8 @@ acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type,
acpi_notify_handler handler,
void *context);
+u8 acpi_osi_windows_version(void);
+
acpi_status
acpi_remove_notify_handler(acpi_handle device,
u32 handler_type, acpi_notify_handler handler);
--
1.7.9.5
next prev parent reply other threads:[~2013-03-07 19:39 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-11 16:21 [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-02-11 17:52 ` Matthew Garrett
2013-02-11 19:06 ` Seth Forshee
2013-02-11 19:09 ` Matthew Garrett
2013-02-11 19:31 ` Rafael J. Wysocki
2013-02-12 3:05 ` Seth Forshee
2013-02-13 20:32 ` Seth Forshee
2013-02-13 20:55 ` Matthew Garrett
2013-02-13 21:04 ` Ben Jencks
2013-02-13 21:49 ` Seth Forshee
2013-02-13 21:46 ` Seth Forshee
2013-02-13 21:54 ` Matthew Garrett
2013-02-13 22:04 ` Seth Forshee
2013-03-07 19:38 ` Seth Forshee
2013-03-07 19:39 ` Seth Forshee [this message]
2013-03-07 19:39 ` [PATCH 2/5] acpi_video: Avoid unnecessary conversions between backlight levels and indexes Seth Forshee
2013-03-07 19:39 ` [PATCH 3/5] acpi_video: Add workaround for broken Windows 8 backlight implementations Seth Forshee
2013-04-04 11:44 ` Aaron Lu
2013-04-04 12:35 ` Seth Forshee
2013-04-04 13:46 ` Aaron Lu
2013-04-04 14:02 ` Seth Forshee
2013-04-04 14:27 ` Aaron Lu
2013-03-07 19:39 ` [PATCH 4/5] acpi_video: Disable use of _BQC when value doesn't match those set through _BCM Seth Forshee
2013-03-07 19:39 ` [PATCH 5/5] acpi_video: Don't handle ACPI brightness notifications by default Seth Forshee
2013-08-02 5:55 ` Aaron Lu
2013-08-02 14:41 ` Rafael J. Wysocki
2013-08-02 14:52 ` Aaron Lu
2013-08-03 0:26 ` Rafael J. Wysocki
2013-08-03 9:46 ` Aaron Lu
2013-08-03 11:23 ` Rafael J. Wysocki
2013-08-03 12:10 ` Aaron Lu
2013-08-03 22:07 ` Rafael J. Wysocki
2013-08-04 1:08 ` Aaron Lu
2013-03-18 21:25 ` [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-04-02 5:18 ` Ben Jencks
2013-04-02 9:15 ` Aaron Lu
2013-04-02 11:23 ` Matthew Garrett
2013-04-02 13:44 ` Aaron Lu
2013-04-02 19:08 ` Matthew Garrett
2013-04-19 12:24 ` Seth Forshee
2013-04-20 22:06 ` Rafael J. Wysocki
2013-04-21 2:29 ` Seth Forshee
2013-04-21 15:46 ` Henrique de Moraes Holschuh
2013-02-13 21:09 ` Ben Jencks
2013-04-01 1:53 ` Aaron Lu
2013-04-01 13:03 ` Seth Forshee
2013-04-02 9:08 ` Aaron Lu
2013-04-02 13:00 ` Seth Forshee
2013-04-02 13:43 ` Aaron Lu
2013-04-03 7:04 ` Ben Jencks
2013-04-03 7:27 ` Aaron Lu
2013-04-03 13:45 ` Seth Forshee
2013-04-04 11:39 ` Aaron Lu
2013-04-19 3:15 ` Aaron Lu
2013-04-20 22:06 ` Rafael J. Wysocki
2013-04-21 11:07 ` Aaron Lu
2013-04-21 12:11 ` Aaron Lu
2013-04-21 21:42 ` Rafael J. Wysocki
2013-04-22 9:39 ` Aaron Lu
2013-04-22 11:51 ` Rafael J. Wysocki
2013-04-22 12:11 ` Aaron Lu
2013-04-22 13:06 ` Seth Forshee
2013-04-22 13:40 ` Aaron Lu
2013-04-22 13:56 ` Seth Forshee
2013-04-22 14:07 ` Aaron Lu
2013-04-22 15:11 ` Seth Forshee
2013-04-22 2:18 ` joeyli
2013-04-22 10:08 ` Aaron Lu
2013-04-22 12:00 ` joeyli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362685180-7768-1-git-send-email-seth.forshee@canonical.com \
--to=seth.forshee@canonical.com \
--cc=ben@bjencks.net \
--cc=jlee@suse.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).