diff options
author | Hans de Goede <hdegoede@redhat.com> | 2022-07-13 23:11:01 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-07-14 21:40:20 +0200 |
commit | 5ad26161a371e4aa2d2553286f0cac580987a493 (patch) | |
tree | 58dcdf549b424795b4bfc8020b62daabf8601e30 /drivers/vlynq | |
parent | b0d55983b2b885f6f96d6d6898d27a60bd9dc9a2 (diff) | |
download | linux-5ad26161a371e4aa2d2553286f0cac580987a493.tar.bz2 |
ACPI: video: Fix acpi_video_handles_brightness_key_presses()
Commit 3a0cf7ab8df3 ("ACPI: video: Change how we determine if brightness
key-presses are handled") made acpi_video_handles_brightness_key_presses()
report false when none of the ACPI Video Devices support backlight control.
But it turns out that at least on a Dell Inspiron N4010 there is no ACPI
backlight control, yet brightness hotkeys are still reported through
the ACPI Video Bus; and since acpi_video_handles_brightness_key_presses()
now returns false, brightness keypresses are now reported twice.
To fix this rename the has_backlight flag to may_report_brightness_keys and
also set it the first time a brightness key press event is received.
Depending on the delivery of the other ACPI (WMI) event vs the ACPI Video
Bus event this means that the first brightness key press might still get
reported twice, but all further keypresses will be filtered as before.
Note that this relies on other drivers reporting brightness key events
calling acpi_video_handles_brightness_key_presses() when delivering
the events (rather then once during driver probe). This is already
required and documented in include/acpi/video.h:
/*
* Note: The value returned by acpi_video_handles_brightness_key_presses()
* may change over time and should not be cached.
*/
Fixes: 3a0cf7ab8df3 ("ACPI: video: Change how we determine if brightness key-presses are handled")
Link: https://lore.kernel.org/regressions/CALF=6jEe5G8+r1Wo0vvz4GjNQQhdkLT5p8uCHn6ZXhg4nsOWow@mail.gmail.com/
Reported-and-tested-by: Ben Greening <bgreening@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://lore.kernel.org/r/20220713211101.85547-2-hdegoede@redhat.com
Diffstat (limited to 'drivers/vlynq')
0 files changed, 0 insertions, 0 deletions