diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-04-30 15:54:36 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-09-03 12:16:53 +0200 |
commit | 3c8b6a399e0eaa6ab839bba2ce9a2bc57e6708d6 (patch) | |
tree | 2c8c452d29833307e98492db0f65b3f978d9fa53 /drivers/gpu/drm/nouveau/nouveau_acpi.c | |
parent | 6cb634d0dc850cc1ae54868de7815df53e64a465 (diff) | |
download | linux-3c8b6a399e0eaa6ab839bba2ce9a2bc57e6708d6.tar.gz linux-3c8b6a399e0eaa6ab839bba2ce9a2bc57e6708d6.tar.bz2 linux-3c8b6a399e0eaa6ab839bba2ce9a2bc57e6708d6.zip |
drm/i915: Call acpi_video_register_backlight() (v3)
On machins without an i915 opregion the acpi_video driver immediately
probes the ACPI video bus and used to also immediately register
acpi_video# backlight devices when supported.
Once the drm/kms driver then loaded later and possibly registered
a native backlight device then the drivers/acpi/video_detect.c code
unregistered the acpi_video0 device to avoid there being 2 backlight
devices (when acpi_video_get_backlight_type()==native).
This means that userspace used to briefly see 2 devices and the
disappearing of acpi_video0 after a brief time confuses the systemd
backlight level save/restore code, see e.g.:
https://bbs.archlinux.org/viewtopic.php?id=269920
To fix this the ACPI video code has been modified to make backlight class
device registration a separate step, relying on the drm/kms driver to
ask for the acpi_video backlight registration after it is done setting up
its native backlight device.
Add a call to the new acpi_video_register_backlight() after the i915 calls
acpi_video_register() (after setting up the i915 opregion) so that the
acpi_video backlight devices get registered on systems where the i915
native backlight device is not registered.
Changes in v2:
-Only call acpi_video_register_backlight() when a panel is detected
Changes in v3:
-Add a new intel_acpi_video_register() helper which checks if a panel
is present and then calls acpi_video_register_backlight()
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c')
0 files changed, 0 insertions, 0 deletions