diff mbox series

ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline

Message ID 20230109191811.53961-1-hdegoede@redhat.com
State Accepted
Commit 420a1116aef0e8e12c305508f45ce73e5ae30a09
Headers show
Series ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline | expand

Commit Message

Hans de Goede Jan. 9, 2023, 7:18 p.m. UTC
The patches adding NVidia-WMI-EC and Apple GMUX backlight detection
support to acpi_video_get_backlight_type(), forgot to update
acpi_video_parse_cmdline() to allow manually selecting these from
the commandline.

Add support for these to acpi_video_parse_cmdline().

Fixes: fe7aebb40d42 ("ACPI: video: Add Nvidia WMI EC brightness control detection (v3)")
Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Rafael J. Wysocki Jan. 11, 2023, 8:15 p.m. UTC | #1
On Mon, Jan 9, 2023 at 8:18 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> The patches adding NVidia-WMI-EC and Apple GMUX backlight detection
> support to acpi_video_get_backlight_type(), forgot to update
> acpi_video_parse_cmdline() to allow manually selecting these from
> the commandline.
>
> Add support for these to acpi_video_parse_cmdline().
>
> Fixes: fe7aebb40d42 ("ACPI: video: Add Nvidia WMI EC brightness control detection (v3)")
> Fixes: 21245df307cb ("ACPI: video: Add Apple GMUX brightness control detection")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/video_detect.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
> index 1b78c7434492..8a541efc5675 100644
> --- a/drivers/acpi/video_detect.c
> +++ b/drivers/acpi/video_detect.c
> @@ -50,6 +50,10 @@ static void acpi_video_parse_cmdline(void)
>                 acpi_backlight_cmdline = acpi_backlight_video;
>         if (!strcmp("native", acpi_video_backlight_string))
>                 acpi_backlight_cmdline = acpi_backlight_native;
> +       if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
> +               acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
> +       if (!strcmp("apple_gmux", acpi_video_backlight_string))
> +               acpi_backlight_cmdline = acpi_backlight_apple_gmux;
>         if (!strcmp("none", acpi_video_backlight_string))
>                 acpi_backlight_cmdline = acpi_backlight_none;
>  }
> --

Applied as 6.2-rc material, thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 1b78c7434492..8a541efc5675 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -50,6 +50,10 @@  static void acpi_video_parse_cmdline(void)
 		acpi_backlight_cmdline = acpi_backlight_video;
 	if (!strcmp("native", acpi_video_backlight_string))
 		acpi_backlight_cmdline = acpi_backlight_native;
+	if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
+		acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
+	if (!strcmp("apple_gmux", acpi_video_backlight_string))
+		acpi_backlight_cmdline = acpi_backlight_apple_gmux;
 	if (!strcmp("none", acpi_video_backlight_string))
 		acpi_backlight_cmdline = acpi_backlight_none;
 }