OSDN Git Service

ACPI: video: Make acpi_backlight=video work independent from GPU driver
authorHans de Goede <hdegoede@redhat.com>
Tue, 4 Apr 2023 11:02:47 +0000 (13:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 5 Apr 2023 18:23:02 +0000 (20:23 +0200)
commite506731c8f35699d746c615164ed620cd53c00ca
treef0e7fd545195f557d0fec148cf2d87c13c35f746
parent78dfc9d1d1abb9e400386fa9c5724a8f7d75e3b9
ACPI: video: Make acpi_backlight=video work independent from GPU driver

Commit 3dbc80a3e4c5 ("ACPI: video: Make backlight class device
registration a separate step (v2)") combined with
commit 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for
creating ACPI backlight by default")

Means that the video.ko code now fully depends on the GPU driver calling
acpi_video_register_backlight() for the acpi_video# backlight class
devices to get registered.

This means that if the GPU driver does not do this, acpi_backlight=video
on the cmdline, or DMI quirks for selecting acpi_video# will not work.

This is a problem on for example Apple iMac14,1 all-in-ones where
the monitor's LCD panel shows up as a regular DP connection instead of
eDP so the GPU driver will not call acpi_video_register_backlight() [1].

Fix this by making video.ko directly register the acpi_video# devices
when these have been explicitly requested either on the cmdline or
through DMI quirks (rather then auto-detection being used).

[1] GPU drivers only call acpi_video_register_backlight() when an internal
panel is detected, to avoid non working acpi_video# devices getting
registered on desktops which unfortunately is a real issue.

Fixes: 5aa9d943e9b6 ("ACPI: video: Don't enable fallback path for creating ACPI backlight by default")
Cc: All applicable <stable@vger.kernel.org>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_video.c