[Pull Request v2][SRU][OEM-6.0] both dell_backlight and nvidia_0 backlight interface appear, and can't adjust the display brightness
AceLan Kao
acelan.kao at canonical.com
Mon May 8 06:32:02 UTC 2023
From: "Chia-Lin Kao (AceLan)" <acelan.kao at canonical.com>
BugLink: https://launchpad.net/bugs/2017774
[Impact]
When switched to discrete mode in the BIOS, nvidia driver will create its
own backlight interface(nvidia_0) to control the backlight, but at the
same time dell-laptop creates its own backlight interface(dell_backlight),
too. In discrete mode, dell_backlight interface doesn't work, and it leads
to gnome chooses the wrong interface(dell_backlight) to control the
backlight and then leads to the issue.
[Fix]
The acpi_video_backlight_use_native() helper function is introduced after
v6.1 and nvidia driver will call this function if kernel provides it. This
helper tells video_detect module that nvidia controls the backlight, so
that dell-laptop won't create another backlight interface when it's loaded
Below commits are all from v6.1-rc1
fb1836c91317 ACPI: video: Prefer native over vendor
a5df42521f32 ACPI: video: Simplify __acpi_video_get_backlight_type()454d61a56d5e ACPI: video: Make acpi_video_backlight_use_native() always return true
b39be9f441f9 ACPI: video: Refactor acpi_video_get_backlight_type() a bit
a2fc3c899bb0 ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()
2600bfa3df99 ACPI: video: Add acpi_video_backlight_use_native() helper
v2. Add more commits to fix the potential regresson on other platforms.
[Test]
Verified on the target machine and confirmed dell_backlight interface is
not generated.
[Where problem could occur]
All changes are in __acpi_video_get_backlight_type() function and to make
it smarter to decide which type of backlight interface should be created.
The final result is pretty similar to the latest mainline version, if it
introduce any regression we can add quirk to list those misjudged machines.
The following changes since commit 83025ac229723ffcb98554b3c17aa5ae3de46775:
UBUNTU: Ubuntu-oem-6.0-6.0.0-1015.15 (2023-04-18 16:01:23 +0300)
are available in the Git repository at:
git://git.launchpad.net/~acelankao/+git/ubuntu-jammy backlight
for you to fetch changes up to 44af5b48b7e955a33ae72fb658b59f02efb61107:
ACPI: video: Add backlight=native DMI quirk for HP EliteBook 8460p (2023-05-08 11:46:35 +0800)
----------------------------------------------------------------
Dmitry Osipenko (1):
ACPI: video: Fix missing native backlight on Chromebooks
Hans de Goede (20):
ACPI: video: Add acpi_video_backlight_use_native() helper
ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()
ACPI: video: Make backlight class device registration a separate step (v2)
ACPI: video: Remove code to unregister acpi_video backlight when a native backlight registers
ACPI: video: Refactor acpi_video_get_backlight_type() a bit
platform/x86: nvidia-wmi-ec-backlight: Move fw interface definitions to a header (v2)
ACPI: video: Add Nvidia WMI EC brightness control detection (v3)
ACPI: video: Add Apple GMUX brightness control detection
platform/x86: apple-gmux: Move port defines to apple-gmux.h
platform/x86: apple-gmux: Add apple_gmux_detect() helper
ACPI: video: Improve Chromebook checks
ACPI: video: Make acpi_video_backlight_use_native() always return true
ACPI: video: Add backlight=native DMI quirk for Dell G15 5515
ACPI: video: Simplify __acpi_video_get_backlight_type()
ACPI: video: Prefer native over vendor
ACPI: video: Fix Apple GMUX backlight detection
ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline
ACPI: video: Fix apple gmux detection
ACPI: video: Add backlight=native DMI quirk for Asus U46E
ACPI: video: Add backlight=native DMI quirk for HP EliteBook 8460p
MAINTAINERS | 1 +
drivers/acpi/Kconfig | 1 +
drivers/acpi/acpi_video.c | 52 ++++++-
drivers/acpi/video_detect.c | 165 +++++++++++++++------
drivers/gpu/drm/gma500/Kconfig | 2 +
drivers/gpu/drm/i915/Kconfig | 2 +
drivers/platform/x86/apple-gmux.c | 93 +++---------
drivers/platform/x86/nvidia-wmi-ec-backlight.c | 68 +--------
include/acpi/video.h | 9 ++
include/linux/apple-gmux.h | 109 +++++++++++++-
.../platform_data/x86/nvidia-wmi-ec-backlight.h | 76 ++++++++++
11 files changed, 382 insertions(+), 196 deletions(-)
create mode 100644 include/linux/platform_data/x86/nvidia-wmi-ec-backlight.h
More information about the kernel-team
mailing list