From: Alex Hung <alex.hung@canonical.com>
To: rjw@rjwysocki.net, lenb@kernel.org, jdelvare@suse.com,
gregkh@linuxfoundation.org, davem@davemloft.net,
mika.westerberg@linux.intel.com,
andriy.shevchenko@linux.intel.com, f.fainelli@gmail.com,
dmitry.torokhov@gmail.com, kishon@ti.com,
karniksayli1995@gmail.com, linux-acpi@vger.kernel.org,
alex.hung@canonical.com, Mario.Limonciello@dell.com
Subject: [PATCH 2/2] ACPI / osi: add DMI quirk for Dell systems
Date: Wed, 31 Jan 2018 00:40:05 -0800 [thread overview]
Message-ID: <1517388005-14852-2-git-send-email-alex.hung@canonical.com> (raw)
In-Reply-To: <1517388005-14852-1-git-send-email-alex.hung@canonical.com>
A number of Dell systems require an OEM _OSI string "Linux-Dell-Video" as
a BIOS workaround for a system hang bug caused by discrete VGA. The form of
the OEM _OSI string is discussed in Documentation/acpi/osi.txt and is
defined by each OEM.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
drivers/acpi/osi.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 107 insertions(+)
diff --git a/drivers/acpi/osi.c b/drivers/acpi/osi.c
index 76998a5..43e4349 100644
--- a/drivers/acpi/osi.c
+++ b/drivers/acpi/osi.c
@@ -477,6 +477,112 @@ static const struct dmi_system_id acpi_osi_dmi_table[] __initconst = {
{}
};
+static int __init dmi_oem_osi_add(const struct dmi_system_id *d)
+{
+ struct acpi_osi_entry *osi;
+ const char *str = d->driver_data;
+ int i;
+
+ for (i = 0; i < OSI_STRING_ENTRIES_MAX; i++) {
+ osi = &osi_setup_entries[i];
+ if (!strcmp(osi->string, str)) {
+ osi->enable = true;
+ continue;
+ } else if (osi->string[0] == '\0') {
+ osi->enable = true;
+ strncpy(osi->string, str, OSI_STRING_LENGTH_MAX);
+ break;
+ }
+ }
+
+ return 0;
+}
+
+static const struct dmi_system_id acpi_oem_osi_dmi_table[] __initconst = {
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell Latitude 5491",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0818]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell Latitude 5591",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0819]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell Precision 3530",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0820]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell Inspiron 7777 AIO",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0850]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell Inspiron 5477 AIO",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0851]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell G5 5779",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0886]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell G5 5779",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0870]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell G5 5579",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[086F]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {
+ .callback = dmi_oem_osi_add,
+ .ident = "Dell G5 5579",
+ .matches = {
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "Dell System"),
+ DMI_EXACT_MATCH(DMI_OEM_STRING, "1[0885]"),
+ },
+ .driver_data = "Linux-Dell-Video",
+ },
+ {}
+};
+
static __init void acpi_osi_dmi_blacklisted(void)
{
dmi_check_system(acpi_osi_dmi_table);
@@ -496,6 +602,7 @@ int __init early_acpi_osi_init(void)
int __init acpi_osi_init(void)
{
acpi_install_interface_handler(acpi_osi_handler);
+ dmi_check_system(acpi_oem_osi_dmi_table);
acpi_osi_setup_late();
return 0;
--
2.7.4
next prev parent reply other threads:[~2018-01-31 8:40 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 8:40 [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches Alex Hung
2018-01-31 8:40 ` Alex Hung [this message]
2018-02-05 13:14 ` [PATCH 2/2] ACPI / osi: add DMI quirk for Dell systems Jean Delvare
2018-02-05 14:15 ` Andy Shevchenko
2018-02-05 17:36 ` Mario.Limonciello
2018-02-05 22:45 ` Dmitry Torokhov
2018-02-06 0:45 ` Mario.Limonciello
2018-02-06 13:45 ` Andy Shevchenko
2018-02-06 16:24 ` Mario.Limonciello
2018-02-07 20:38 ` Alex Hung
2018-02-07 20:49 ` Mario.Limonciello
2018-02-11 9:29 ` Rafael J. Wysocki
2018-02-11 13:45 ` Lukas Wunner
2018-02-12 9:49 ` Rafael J. Wysocki
2018-02-12 20:29 ` Mario.Limonciello
2018-02-12 22:57 ` Rafael J. Wysocki
2018-02-12 23:14 ` Mario.Limonciello
2018-02-13 5:25 ` Alex Hung
2018-02-13 7:32 ` Mika Westerberg
2018-02-14 9:06 ` Rafael J. Wysocki
2018-02-14 9:50 ` Mika Westerberg
2018-02-13 9:18 ` Rafael J. Wysocki
2018-02-13 9:55 ` Lukas Wunner
2018-02-14 9:10 ` Rafael J. Wysocki
2018-02-14 18:47 ` Mario.Limonciello
2018-02-15 9:44 ` Rafael J. Wysocki
2018-02-05 17:24 ` Mario.Limonciello
2018-02-05 21:55 ` Jean Delvare
2018-02-07 20:05 ` Alex Hung
2018-02-05 10:26 ` [PATCH 1/2] firmware: dmi_scan: add DMI_OEM_STRING support to dmi_matches Jean Delvare
2018-02-07 5:25 ` Alex Hung
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=1517388005-14852-2-git-send-email-alex.hung@canonical.com \
--to=alex.hung@canonical.com \
--cc=Mario.Limonciello@dell.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=dmitry.torokhov@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jdelvare@suse.com \
--cc=karniksayli1995@gmail.com \
--cc=kishon@ti.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rjw@rjwysocki.net \
/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).