ACPI / osi: Fix default _OSI(Darwin) support
The following commit always reports positive value when Apple hardware queries _OSI("Darwin"): Commit:7bc5a2bad0
Subject: ACPI: Support _OSI("Darwin") correctly However since this implementation places the judgement in runtime, it breaks acpi_osi=!Darwin and cannot return unsupported for _OSI("WinXXX") invoked before invoking _OSI("Darwin"). This patch fixes the issues by reverting the wrong support and implementing the default behavior of _OSI("Darwin")/_OSI("WinXXX") on Apple hardware via DMI matching. Fixes:7bc5a2bad0
(ACPI: Support _OSI("Darwin") correctly) Link: https://bugzilla.kernel.org/show_bug.cgi?id=92111 Reported-and-tested-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Chen Yu <yu.c.chen@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
a707edebad
commit
e10cfdc33a
@@ -133,6 +133,11 @@ int __init acpi_blacklisted(void)
|
||||
return blacklisted;
|
||||
}
|
||||
#ifdef CONFIG_DMI
|
||||
static int __init dmi_enable_osi_darwin(const struct dmi_system_id *d)
|
||||
{
|
||||
acpi_dmi_osi_darwin(1, d); /* enable */
|
||||
return 0;
|
||||
}
|
||||
static int __init dmi_enable_osi_linux(const struct dmi_system_id *d)
|
||||
{
|
||||
acpi_dmi_osi_linux(1, d); /* enable */
|
||||
@@ -331,6 +336,24 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
|
||||
},
|
||||
},
|
||||
|
||||
/*
|
||||
* Enable _OSI("Darwin") for all apple platforms.
|
||||
*/
|
||||
{
|
||||
.callback = dmi_enable_osi_darwin,
|
||||
.ident = "Apple hardware",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = dmi_enable_osi_darwin,
|
||||
.ident = "Apple hardware",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Apple Computer, Inc."),
|
||||
},
|
||||
},
|
||||
|
||||
#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
|
||||
/*
|
||||
* DELL XPS 13 (2015) switches sound between HDA and I2S
|
||||
|
Reference in New Issue
Block a user