lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250910074711.1511753-1-zhangzihuan@kylinos.cn>
Date: Wed, 10 Sep 2025 15:47:11 +0800
From: Zihuan Zhang <zhangzihuan@...inos.cn>
To: "Rafael J . wysocki" <rafael@...nel.org>,
	Hans de Goede <hansg@...nel.org>
Cc: Len Brown <lenb@...nel.org>,
	Mario Limonciello <mario.limonciello@....com>,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zihuan Zhang <zhangzihuan@...inos.cn>,
	stable@...r.kernel.org
Subject: [PATCH v1] ACPI: video: Fix missing backlight node creation on Zhaoxin platforms

Some recent Lenovo and Inspur machines with Zhaoxin CPUs fail to create
/sys/class/backlight/acpi_video0 on v6.6 kernels, while the same hardware
works correctly on v5.4.

Our analysis shows that the current implementation assumes the presence of a
GPU. The backlight registration is only triggered if a GPU is detected, but on
these platforms the backlight is handled purely by the EC without any GPU.
As a result, the detection path does not create the expected backlight node.

To fix this, move the following logic:

/* Use ACPI video if available, except when native should be preferred. */
if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
    !(native_available && prefer_native_over_acpi_video()))
        return acpi_backlight_video;

above the if (auto_detect) *auto_detect = true; statement.

This ensures that the ACPI video backlight node is created even when no GPU is
present, restoring the correct behavior observed on older kernels.

Fixes: 78dfc9d1d1ab ("ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type()")
Cc: stable@...r.kernel.org
Signed-off-by: Zihuan Zhang <zhangzihuan@...inos.cn>
---
 drivers/acpi/video_detect.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index d507d5e08435..c1bb22b57f56 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -1011,6 +1011,11 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
 	if (acpi_backlight_dmi != acpi_backlight_undef)
 		return acpi_backlight_dmi;
 
+	/* Use ACPI video if available, except when native should be preferred. */
+	if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
+	     !(native_available && prefer_native_over_acpi_video()))
+		return acpi_backlight_video;
+
 	if (auto_detect)
 		*auto_detect = true;
 
@@ -1024,11 +1029,6 @@ enum acpi_backlight_type __acpi_video_get_backlight_type(bool native, bool *auto
 	if (dell_uart_present)
 		return acpi_backlight_dell_uart;
 
-	/* Use ACPI video if available, except when native should be preferred. */
-	if ((video_caps & ACPI_VIDEO_BACKLIGHT) &&
-	     !(native_available && prefer_native_over_acpi_video()))
-		return acpi_backlight_video;
-
 	/* Use native if available */
 	if (native_available)
 		return acpi_backlight_native;
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ