Commit e9cf4d9b authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Hans de Goede

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: default avatarHans de Goede <hdegoede@redhat.com>
Fixes: 2600bfa3 ("ACPI: video: Add acpi_video_backlight_use_native() helper")
Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20221024141210.67784-1-dmitry.osipenko@collabora.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 555a68dd
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment