Commit 0e501834 authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown

thinkpad-acpi: rework brightness support

Refactor and redesign the brightness control backend...

In order to fix bugzilla #11750...

Add a new brightness control mode: support direct NVRAM checkpointing
of the backlight level (i.e. store directly to NVRAM without the need
for UCMS calls), and use that together with the EC-based control.
Disallow UCMS+EC, thus avoiding races with the SMM firmware.

Switch the models that define HBRV (EC Brightness Value) in the DSDT
to the new mode.  These are: T40-T43, R50-R52, R50e, R51e, X31-X41.

Change the default for all other IBM ThinkPads to UCMS-only.  The
Lenovo models already default to UCMS-only.
Reported-by: default avatarAlexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 74a60c0f
...@@ -1157,10 +1157,15 @@ display backlight brightness control methods have 16 levels, ranging ...@@ -1157,10 +1157,15 @@ display backlight brightness control methods have 16 levels, ranging
from 0 to 15. from 0 to 15.
There are two interfaces to the firmware for direct brightness control, There are two interfaces to the firmware for direct brightness control,
EC and CMOS. To select which one should be used, use the EC and UCMS (or CMOS). To select which one should be used, use the
brightness_mode module parameter: brightness_mode=1 selects EC mode, brightness_mode module parameter: brightness_mode=1 selects EC mode,
brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC brightness_mode=2 selects UCMS mode, brightness_mode=3 selects EC
and CMOS. The driver tries to auto-detect which interface to use. mode with NVRAM backing (so that brightness changes are remembered
across shutdown/reboot).
The driver tries to select which interface to use from a table of
defaults for each ThinkPad model. If it makes a wrong choice, please
report this as a bug, so that we can fix it.
When display backlight brightness controls are available through the When display backlight brightness controls are available through the
standard ACPI interface, it is best to use it instead of this direct standard ACPI interface, it is best to use it instead of this direct
...@@ -1498,6 +1503,7 @@ to enable more than one output class, just add their values. ...@@ -1498,6 +1503,7 @@ to enable more than one output class, just add their values.
(bluetooth, WWAN, UWB...) (bluetooth, WWAN, UWB...)
0x0008 HKEY event interface, hotkeys 0x0008 HKEY event interface, hotkeys
0x0010 Fan control 0x0010 Fan control
0x0020 Backlight brightness
There is also a kernel build option to enable more debugging There is also a kernel build option to enable more debugging
information, which may be necessary to debug driver problems. information, which may be necessary to debug driver problems.
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment