]> git.ipfire.org Git - thirdparty/systemd.git/commit
backlight: fix issue on multiple graphics cards system 24250/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 8 Aug 2022 17:02:02 +0000 (02:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 17 Aug 2022 05:22:43 +0000 (14:22 +0900)
commite0504dd011189d97a1ea813aabfe1e696742bcf5
tree1972d3f4d5eb6ca5f6ea3308858e551619cc05f7
parentf8ff4b60763cb3afc619119b2ed280d3b1fa0aba
backlight: fix issue on multiple graphics cards system

If a system has multiple graphics cards, then we cannot associate
platform backlight devices to backlight devices under PCI bus.

Previously, in such case, vaidate_device() for a raw backlight device
might erroneously detect a platform device and return false. So, users
could not save/load backlight level.

This makes validate_device() give up to associate platform devices on
non-PCI bus with raw backlight devices. That may cause unwanted
backlight level save or restore by systemd-backlight@.service, but users
can workaround that by masking specific instances of the service.

Closes #24223.
src/backlight/backlight.c