summaryrefslogtreecommitdiff
path: root/drivers/pwm
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-02-13 16:32:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-06 21:30:09 -0800
commit3cb947fdcff6247559da0b23dc3ed6272cff8372 (patch)
treeb458d90725ea439dc12ae72bf4bf4c3d3372dc26 /drivers/pwm
parent6b96200e1d9cf0fa202418ff07ed3542abace2a9 (diff)
downloadlinux-3.10-3cb947fdcff6247559da0b23dc3ed6272cff8372.tar.gz
linux-3.10-3cb947fdcff6247559da0b23dc3ed6272cff8372.tar.bz2
linux-3.10-3cb947fdcff6247559da0b23dc3ed6272cff8372.zip
ACPI / video: Filter the _BCL table for duplicate brightness values
commit bd8ba20597f0cfef3ef65c3fd2aa92ab23d4c8e1 upstream. Some devices have duplicate entries in there brightness levels table, ie on my Dell Latitude E6430 the table looks like this: [ 3.686060] acpi backlight index 0, val 80 [ 3.686095] acpi backlight index 1, val 50 [ 3.686122] acpi backlight index 2, val 5 [ 3.686147] acpi backlight index 3, val 5 [ 3.686172] acpi backlight index 4, val 5 [ 3.686197] acpi backlight index 5, val 5 [ 3.686223] acpi backlight index 6, val 5 [ 3.686248] acpi backlight index 7, val 5 [ 3.686273] acpi backlight index 8, val 6 [ 3.686332] acpi backlight index 9, val 7 [ 3.686356] acpi backlight index 10, val 8 [ 3.686380] acpi backlight index 11, val 9 etc. Notice that brightness values 0-5 are all mapped to 5. This means that if userspace writes any value between 0 and 5 to the brightness sysfs attribute and then reads it, it will always return 0, which is somewhat unexpected. This is a problem for ie gnome-settings-daemon, which uses read-modify-write logic when the users presses the brightness up or down keys. This is done this way to take brightness changes from other sources into account. On this specific laptop what happens once the brightness has been set to 0, is that gsd reads 0, adds 5, writes 5, and on the next brightness up key press again reads 0, so things get stuck at the lowest brightness setting. Filtering out the duplicate table entries, makes any write to brightness read back as the written value as one would expect, fixing this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pwm')
0 files changed, 0 insertions, 0 deletions