linux-stable/include
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
..
acpi ACPI: video: Make backlight class device registration a separate step (v2) 2022-09-02 09:57:14 +02:00
asm-generic Bitmap patches for v6.0-rc1 2022-08-07 17:52:35 -07:00
clocksource - Add the missing DT bindings for the MTU nomadik timer (Linus 2022-07-28 12:33:34 +02:00
crypto for-5.20/block-2022-08-04 2022-08-04 20:00:14 -07:00
drm
dt-bindings power supply and reset changes for the v6.0 series 2022-08-12 09:37:33 -07:00
keys
kunit
kvm
linux radix-tree: replace gfp.h inclusion with gfp_types.h 2022-08-14 13:31:03 -07:00
math-emu
media SPDX changes for 6.0-rc1 2022-08-04 12:12:54 -07:00
memory
misc
net Including fixes from bluetooth, bpf, can and netfilter. 2022-08-11 13:45:37 -07:00
pcmcia
ras mm, hwpoison: enable memory error handling on 1GB hugepage 2022-08-08 18:06:44 -07:00
rdma dma-mapping updates 2022-08-06 10:56:45 -07:00
rv Documentation/rv: Add deterministic automata monitor synthesis documentation 2022-07-30 14:01:29 -04:00
scsi SCSI misc on 20220813 2022-08-13 13:41:48 -07:00
soc Char / Misc driver changes for 6.0-rc1 2022-08-04 11:05:48 -07:00
sound ASoC: More updates for v5.20 2022-08-01 15:26:40 +02:00
target scsi: target: core: De-RCU of se_lun and se_lun acl 2022-08-01 19:36:02 -04:00
trace * Xen timer fixes 2022-08-11 12:10:08 -07:00
uapi virtio: fatures, fixes 2022-08-12 09:50:34 -07:00
ufs
vdso
video
xen x86/xen: Add support for HVMOP_set_evtchn_upcall_vector 2022-08-12 11:28:21 +02:00