From: Hans de Goede <hdegoede@redhat.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>,
Matthew Garrett <mjg59@srcf.ucam.org>,
linux-acpi@vger.kernel.org,
"Mr . Chromebox" <mrchromebox@gmail.com>
Subject: [PATCH 1/3] ACPI: video: Improve Chromebook checks
Date: Fri, 4 Nov 2022 22:21:06 +0100 [thread overview]
Message-ID: <20221104212108.73537-2-hdegoede@redhat.com> (raw)
In-Reply-To: <20221104212108.73537-1-hdegoede@redhat.com>
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>
---
drivers/acpi/video_detect.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 9cd8797d12bb..06aaec2e378b 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -670,7 +670,7 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
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())
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. */
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;
}
- /*
- * 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;
}
--
2.37.3
next prev parent reply other threads:[~2022-11-04 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 21:21 [PATCH 0/3] ACPI: video: Fix backlight regressions in 6.1 Hans de Goede
2022-11-04 21:21 ` Hans de Goede [this message]
2022-11-04 21:21 ` [PATCH 2/3] ACPI: video: Make acpi_video_backlight_use_native() always return true Hans de Goede
2022-11-04 21:21 ` [PATCH 3/3] ACPI: video: Add backlight=native DMI quirk for Dell G15 5515 Hans de Goede
2022-11-04 22:11 ` Daniel Dadap
2022-11-05 18:03 ` [PATCH 0/3] ACPI: video: Fix backlight regressions in 6.1 Rafael J. Wysocki
2022-11-07 10:10 ` Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221104212108.73537-2-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=mrchromebox@gmail.com \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox