ACPI: Skip the first two elements in the _BCL package
authorZhao Yakui <yakui.zhao@intel.com>
Mon, 2 Feb 2009 03:33:41 +0000 (11:33 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 12 Feb 2009 17:31:09 +0000 (09:31 -0800)
commitbe1dd7ec6e3f6fd571f4a317134a9c41ed01e021
treebe83d17b7222d40cf1a1603e1f66d2e237606b7b
parent265be30a8f3fbfbab0b16b44c6ac4715ff08e27b
ACPI: Skip the first two elements in the _BCL package

commit 0a3db1cec5d476804185114ff5d1845aed3936b3 upstream.

According to the Spec the first two elements in the _BCL package won't be

regarded as the available brightness level. The first is the brightness when
full power is connected to the box(It means that the AC adapter is plugged).
The second is the brightness level when the box is on battery.
    If the first two elements are still used while finding the next brightness
level, it will fall back to the lowest level when keeping on pressing
hotkey. (On some boxes the brightness will be changed twice when hotkey is
pressed once. One is in the ACPI video driver. The other is changed by sys I/F.
In the ACPI video driver the first two elements will be used while changing
the brightness. But the first two elements is skipped while using sys I/F.
In such case there exists the inconsistency).
    So he first two elements had better be skipped while showing the available
brightness or finding the next brightness level.

http://bugzilla.kernel.org/show_bug.cgi?id=12450

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/video.c