linux/include/acpi
Hans de Goede 3dbc80a3e4 ACPI: video: Make backlight class device registration a separate step (v2)
On x86/ACPI boards the acpi_video driver will usually initialize before
the kms driver (except i915). This causes /sys/class/backlight/acpi_video0
to show up and then the kms driver registers its own native backlight
device after which the drivers/acpi/video_detect.c code unregisters
the acpi_video0 device (when acpi_video_get_backlight_type()==native).

This means that userspace briefly sees 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 make backlight class device registration a separate step
done by a new acpi_video_register_backlight() function. The intend is for
this to be called by the drm/kms driver *after* it is done setting up its
own native backlight device. So that acpi_video_get_backlight_type() knows
if a native backlight will be available or not at acpi_video backlight
registration time, avoiding the add + remove dance.

Note the new acpi_video_register_backlight() function is also called from
a delayed work to ensure that the acpi_video backlight devices does get
registered if necessary even if there is no drm/kms driver or when it is
disabled.

Changes in v2:
- Make register_backlight_delay a module parameter, mainly so that it can
  be disabled by Nvidia binary driver users

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2022-09-02 09:57:14 +02:00
..
platform ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acbuffer.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acconfig.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acexcep.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acnames.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acoutput.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acpi.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acpi_bus.h Merge branch 'acpi-properties' 2022-08-11 19:21:03 +02:00
acpi_drivers.h Merge branches 'acpi-pci' and 'acpi-processor' 2021-04-26 17:03:05 +02:00
acpi_io.h Revert "ACPI: Add memory semantics to acpi_os_map_memory()" 2021-09-23 20:39:36 +02:00
acpi_lpat.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
acpi_numa.h ACPI: processor: Replace kernel.h with the necessary inclusions 2021-11-24 17:44:04 +01:00
acpiosxf.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
acpixf.h ACPICA: Update version to 20220331 2022-04-13 20:24:58 +02:00
acrestyp.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
actbl.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
actbl1.h ACPICA: Removed some tabs and // comments 2022-04-13 20:24:57 +02:00
actbl2.h ACPICA: IORT: Updates for revision E.d 2022-04-13 20:24:58 +02:00
actbl3.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
actypes.h ACPICA: Removed some tabs and // comments 2022-04-13 20:24:57 +02:00
acuuid.h ACPICA: Update copyright notices to the year 2022 2022-04-13 20:24:57 +02:00
apei.h ACPI: APEI: Fix missing ERST record id 2022-04-13 20:29:24 +02:00
battery.h ACPI: battery: include linux/power_supply.h 2020-09-25 18:31:19 +02:00
button.h ACPI: button: move HIDs to acpi/button.h 2020-02-13 23:36:23 +01:00
cppc_acpi.h ACPI: CPPC: Do not prevent CPPC from working in the future 2022-07-26 20:56:49 +02:00
ghes.h ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records 2020-09-16 10:30:42 +01:00
hed.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
nfit.h acpi, nfit: Add function to look up nvdimm device and provide SMBIOS handle 2018-03-14 12:43:50 +01:00
pcc.h mailbox: pcc: Use PCC mailbox channel pointer instead of standard 2021-10-29 22:46:38 -05:00
pdc_intel.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor.h ACPI: processor: Drop leftover acpi_processor_get_limit_info() declaration 2022-06-29 19:01:23 +02:00
reboot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
video.h ACPI: video: Make backlight class device registration a separate step (v2) 2022-09-02 09:57:14 +02:00