asus-wmi: Add dgpu disable method
authorLuke D. Jones <luke@ljones.dev>
Sat, 7 Aug 2021 02:36:55 +0000 (14:36 +1200)
committerHans de Goede <hdegoede@redhat.com>
Thu, 12 Aug 2021 15:23:00 +0000 (17:23 +0200)
commit98829e84dc67630efb7de675f0a70066620468a3
treea23675b15356cd405a7eef22fd73d84a7e56ef51
parentca91ea34778f9b2a44a391b10164bcd73b4b0f25
asus-wmi: Add dgpu disable method

In Windows the ASUS Armory Crate program can enable or disable the
dGPU via a WMI call. This functions much the same as various Linux
methods in software where the dGPU is removed from the device tree.

However the WMI call saves the state of dGPU (enabled or not) and
this then changes the dGPU visibility in Linux with no way for
Linux users to re-enable it. We expose the WMI method so users can
see and change the dGPU ACPI state.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Link: https://lore.kernel.org/r/20210807023656.25020-3-luke@ljones.dev
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-wmi.c
include/linux/platform_data/x86/asus-wmi.h