]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ACPI: Execute platform _OSC also with query bit clear
authorMario Limonciello <mario.limonciello@dell.com>
Mon, 26 Oct 2020 15:01:05 +0000 (18:01 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Thu, 4 Feb 2021 07:45:25 +0000 (10:45 +0300)
commit719e1f561afbe020ed175825a9bd25ed62ed1697
tree508c8d3c703cc9777b3acf34ddc4de4eb078ee1e
parent5ca67688256a0aeede5cba288eaef4d8e4a9e622
ACPI: Execute platform _OSC also with query bit clear

The platform _OSC can change the hardware state when query bit is not
set. According to ACPI spec it is recommended that the OS runs _OSC with
query bit set until the platform does not mask any of the capabilities.
Then it should run it with query bit clear in order to actually commit
the changes. Linux has not been doing this for the reasons that there
has not been anything to commit, until now.

The ACPI 6.4 introduced _OSC for USB4 to allow the OS to negotiate
native control over USB4 tunneling. The platform might implement this so
that it only activates the software connection manager path when the OS
calls the _OSC with the query bit clear. Otherwise it may default to the
firmware connection manager, for instance.

For this reason modify the _OSC support so that we first execute it with
query bit set, then use the returned value as base of the features we
want to control and run the _OSC again with query bit clear. This also
follows what Windows is doing.

Also rename the function to better match what it does.

Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/acpi/bus.c