[PATCH 1/1][SRU][OEM-6.1] UBUNTU: SAUCE: ACPI: video: Dell AIO UART backlight detection
AceLan Kao
acelan.kao at canonical.com
Thu Mar 2 09:29:00 UTC 2023
From: "Chia-Lin Kao (AceLan)" <acelan.kao at canonical.com>
BugLink: https://launchpad.net/bugs/2008882
The similar functionality has been reverted by below commit as the
function acpi_video_set_dmi_backlight_type() has been removed from
upstream.
2a773621f3495 ("UBUNTU: SAUCE: platform/x86: dell-uart-backlight: remove acpi_video_set_dmi_backlight_type()")
Now, we use new way to auto detect the Dell AIO platforms which
contains "DELL0501" HID.
Change-Id: Iaa5cee7913f8c10094f02f18a882e17688350b69
Signed-off-by: Chia-Lin Kao (AceLan) <acelan.kao at canonical.com>
---
drivers/acpi/video_detect.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index b48f85c3791e9..250d113665190 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -770,6 +770,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
static DEFINE_MUTEX(init_mutex);
static bool nvidia_wmi_ec_present;
static bool apple_gmux_present;
+ static bool dell_uart_backlight_present;
static bool native_available;
static bool init_done;
static long video_caps;
@@ -784,6 +785,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
&video_caps, NULL);
nvidia_wmi_ec_present = nvidia_wmi_ec_supported();
apple_gmux_present = apple_gmux_detect(NULL, NULL);
+ dell_uart_backlight_present = acpi_dev_found("DELL0501");
init_done = true;
}
if (native)
@@ -808,6 +810,9 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
if (apple_gmux_present)
return acpi_backlight_apple_gmux;
+ if (dell_uart_backlight_present)
+ return acpi_backlight_native;
+
/* Use ACPI video if available, except when native should be preferred. */
if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
!(native_available && prefer_native_over_acpi_video()))
--
2.34.1
More information about the kernel-team
mailing list