mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
ACPI: video: Improve Chromebook checks
2 improvements for the Chromebook handling in acpi_video_get_backlight_type(): 1. Also check for the "GOOG000C" ACPI HID used on some models 2. Move the Chromebook check to above the ACPI-video check normally Chromebooks don't have ACPI video backlight support, but when flashed with upstream coreboot builds they may have ACPI video backlight support, but native should still be used/preferred then. Suggested-by: Mr. Chromebox <mrchromebox@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
e9cf4d9b9a
commit
59dc2a7e7c
@ -670,7 +670,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
|||||||
|
|
||||||
static bool google_cros_ec_present(void)
|
static bool google_cros_ec_present(void)
|
||||||
{
|
{
|
||||||
return acpi_dev_found("GOOG0004");
|
return acpi_dev_found("GOOG0004") || acpi_dev_found("GOOG000C");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -718,6 +718,10 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
|||||||
if (apple_gmux_present())
|
if (apple_gmux_present())
|
||||||
return acpi_backlight_apple_gmux;
|
return acpi_backlight_apple_gmux;
|
||||||
|
|
||||||
|
/* Chromebooks should always prefer native backlight control. */
|
||||||
|
if (google_cros_ec_present() && native_available)
|
||||||
|
return acpi_backlight_native;
|
||||||
|
|
||||||
/* On systems with ACPI video use either native or ACPI video. */
|
/* On systems with ACPI video use either native or ACPI video. */
|
||||||
if (video_caps & ACPI_VIDEO_BACKLIGHT) {
|
if (video_caps & ACPI_VIDEO_BACKLIGHT) {
|
||||||
/*
|
/*
|
||||||
@ -735,13 +739,6 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
|||||||
return acpi_backlight_video;
|
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. */
|
/* No ACPI video (old hw), use vendor specific fw methods. */
|
||||||
return acpi_backlight_vendor;
|
return acpi_backlight_vendor;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user