aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-10-25 12:05:08 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-10-25 12:05:08 -0700
commit4dc12f37a8e98e1dca5521c14625c869537b50b6 (patch)
tree8525e0744917e0d531727e834512ccf84093f025 /drivers/acpi
parentscsi: mpt3sas: re-do lost mpt3sas DMA mask fix (diff)
parentACPI: video: Fix missing native backlight on Chromebooks (diff)
downloadwireguard-linux-4dc12f37a8e98e1dca5521c14625c869537b50b6.tar.xz
wireguard-linux-4dc12f37a8e98e1dca5521c14625c869537b50b6.zip
Merge tag 'platform-drivers-x86-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Hans de Goede: "The only thing which stands out is a fix for a backlight regression on Chromebooks (under drivers/acpi, with ack from Rafael). Other then that nothing special to report just various small fixes and hardware-id additions" * tag 'platform-drivers-x86-v6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: ACPI: video: Fix missing native backlight on Chromebooks platform/x86/intel: pmc/core: Add Raptor Lake support to pmc core driver leds: simatic-ipc-leds-gpio: fix incorrect LED to GPIO mapping platform/x86/amd: pmc: Read SMU version during suspend on Cezanne systems platform/x86: thinkpad_acpi: Fix reporting a non present second fan on some models platform/x86: asus-wmi: Add support for ROG X16 tablet mode
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/video_detect.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 0d9064a9804c..9cd8797d12bb 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
{ },
};
+static bool google_cros_ec_present(void)
+{
+ return acpi_dev_found("GOOG0004");
+}
+
/*
* Determine which type of backlight interface to use on this system,
* First check cmdline, then dmi quirks, then do autodetect.
@@ -730,6 +735,13 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
return acpi_backlight_video;
}
+ /*
+ * Chromebooks that don't have backlight handle in ACPI table
+ * are supposed to use native backlight if it's available.
+ */
+ if (google_cros_ec_present() && native_available)
+ return acpi_backlight_native;
+
/* No ACPI video (old hw), use vendor specific fw methods. */
return acpi_backlight_vendor;
}