]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: nvidia-wmi-ec-backlight: Add force module parameter
authorHans de Goede <hdegoede@redhat.com>
Fri, 17 Feb 2023 14:42:08 +0000 (15:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 Feb 2023 10:25:43 +0000 (11:25 +0100)
commitbb592acc5f3950f1c42e4b70d817918cf65fe7bb
treefb0b52f4ec7b7ba535869685fa63aafa7901c78b
parent88b75ac3197342e602e1fe32bf7e451749817342
platform/x86: nvidia-wmi-ec-backlight: Add force module parameter

commit f1a8bbd0295526e7aeacb070372246cb6cae5a59 upstream.

On some Lenovo Legion models, the backlight might be driven by either
one of nvidia_wmi_ec_backlight or amdgpu_bl0 at different times.

When the Nvidia WMI EC backlight interface reports the backlight is
controlled by the EC, the current backlight handling only registers
nvidia_wmi_ec_backlight (and registers no other backlight interfaces).

This hides (never registers) the amdgpu_bl0 interface, where as prior
to 6.1.4 users would have both nvidia_wmi_ec_backlight and amdgpu_bl0
and could work around things in userspace.

Add a force module parameter which can be used with acpi_backlight=native
to restore the old behavior as a workound (for now) by passing:

"acpi_backlight=native nvidia-wmi-ec-backlight.force=1"

Fixes: 0996c84e4700 ("platform/x86: nvidia-wmi-ec-backlight: Use acpi_video_get_backlight_type()")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217026
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Dadap <ddadap@nvidia.com>
Link: https://lore.kernel.org/r/20230217144208.5721-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/platform/x86/nvidia-wmi-ec-backlight.c