Skip to content

Commit e9cf4d9

Browse files
digetxjwrdegoede
authored andcommitted
ACPI: video: Fix missing native backlight on Chromebooks
Chromebooks don't have backlight in ACPI table, they suppose to use native backlight in this case. Check presence of the CrOS embedded controller ACPI device and prefer the native backlight if EC found. Suggested-by: Hans de Goede <[email protected]> Fixes: 2600bfa ("ACPI: video: Add acpi_video_backlight_use_native() helper") Signed-off-by: Dmitry Osipenko <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent 555a68d commit e9cf4d9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/acpi/video_detect.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
668668
{ },
669669
};
670670

671+
static bool google_cros_ec_present(void)
672+
{
673+
return acpi_dev_found("GOOG0004");
674+
}
675+
671676
/*
672677
* Determine which type of backlight interface to use on this system,
673678
* 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)
730735
return acpi_backlight_video;
731736
}
732737

738+
/*
739+
* Chromebooks that don't have backlight handle in ACPI table
740+
* are supposed to use native backlight if it's available.
741+
*/
742+
if (google_cros_ec_present() && native_available)
743+
return acpi_backlight_native;
744+
733745
/* No ACPI video (old hw), use vendor specific fw methods. */
734746
return acpi_backlight_vendor;
735747
}

0 commit comments

Comments
 (0)