--- - branch: MAIN date: Thu Dec 30 14:40:06 UTC 2021 files: - new: '1.21' old: '1.20' path: src/sys/dev/acpi/acpi_display.c pathrev: src/sys/dev/acpi/acpi_display.c@1.21 type: modified id: 20211230T144006Z.bff5354f382248869995dc001b29b133a72bc223 log: | acpiout(4): Work around firmware that doesn't like some brightnesses. Instead of just asking for cur - 5 or cur + 5, repeatedly ask for that increment, check whether we actually made progress in that direction, and if not keep going with another increment, until we hit the bounds of brightness levels. I can't find anything in the ACPI spec about this, but my laptop seems to have trouble with certain levels: 15, 75, 85, 95. It goes in all other increments of 5 from 5 to 100, just not those ones -- acts as if the change just never happened, so with the old logic the brightness up/down would get stuck unable to move in either direction. This should have no impact on machines where the first increment actually takes. module: src subject: 'CVS commit: src/sys/dev/acpi' unixtime: '1640875206' user: riastradh