Skip to content

Commit 7fb091f

Browse files
changbindurafaeljw
authored andcommitted
Documentation: ACPI: move video_extension.txt to firmware-guide/acpi and convert to reST
This converts the plain text documentation to reStructuredText format and adds it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du <[email protected]> Reviewed-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7fe1907 commit 7fb091f

File tree

2 files changed

+50
-34
lines changed

2 files changed

+50
-34
lines changed

Documentation/firmware-guide/acpi/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ ACPI Support
2323
i2c-muxes
2424
acpi-lid
2525
lpit
26+
video_extension
Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
=====================
14
ACPI video extensions
2-
~~~~~~~~~~~~~~~~~~~~~
5+
=====================
36

47
This driver implement the ACPI Extensions For Display Adapters for
58
integrated graphics devices on motherboard, as specified in ACPI 2.0
@@ -8,9 +11,10 @@ defining the video POST device, retrieving EDID information or to
811
setup a video output, etc. Note that this is an ref. implementation
912
only. It may or may not work for your integrated video device.
1013

11-
The ACPI video driver does 3 things regarding backlight control:
14+
The ACPI video driver does 3 things regarding backlight control.
1215

13-
1 Export a sysfs interface for user space to control backlight level
16+
Export a sysfs interface for user space to control backlight level
17+
==================================================================
1418

1519
If the ACPI table has a video device, and acpi_backlight=vendor kernel
1620
command line is not present, the driver will register a backlight device
@@ -22,36 +26,41 @@ The backlight sysfs interface has a standard definition here:
2226
Documentation/ABI/stable/sysfs-class-backlight.
2327

2428
And what ACPI video driver does is:
25-
actual_brightness: on read, control method _BQC will be evaluated to
26-
get the brightness level the firmware thinks it is at;
27-
bl_power: not implemented, will set the current brightness instead;
28-
brightness: on write, control method _BCM will run to set the requested
29-
brightness level;
30-
max_brightness: Derived from the _BCL package(see below);
31-
type: firmware
29+
30+
actual_brightness:
31+
on read, control method _BQC will be evaluated to
32+
get the brightness level the firmware thinks it is at;
33+
bl_power:
34+
not implemented, will set the current brightness instead;
35+
brightness:
36+
on write, control method _BCM will run to set the requested brightness level;
37+
max_brightness:
38+
Derived from the _BCL package(see below);
39+
type:
40+
firmware
3241

3342
Note that ACPI video backlight driver will always use index for
3443
brightness, actual_brightness and max_brightness. So if we have
35-
the following _BCL package:
44+
the following _BCL package::
3645

37-
Method (_BCL, 0, NotSerialized)
38-
{
39-
Return (Package (0x0C)
46+
Method (_BCL, 0, NotSerialized)
4047
{
41-
0x64,
42-
0x32,
43-
0x0A,
44-
0x14,
45-
0x1E,
46-
0x28,
47-
0x32,
48-
0x3C,
49-
0x46,
50-
0x50,
51-
0x5A,
52-
0x64
53-
})
54-
}
48+
Return (Package (0x0C)
49+
{
50+
0x64,
51+
0x32,
52+
0x0A,
53+
0x14,
54+
0x1E,
55+
0x28,
56+
0x32,
57+
0x3C,
58+
0x46,
59+
0x50,
60+
0x5A,
61+
0x64
62+
})
63+
}
5564

5665
The first two levels are for when laptop are on AC or on battery and are
5766
not used by Linux currently. The remaining 10 levels are supported levels
@@ -62,13 +71,15 @@ as a "brightness level" indicator. Thus from the user space perspective
6271
the range of available brightness levels is from 0 to 9 (max_brightness)
6372
inclusive.
6473

65-
2 Notify user space about hotkey event
74+
Notify user space about hotkey event
75+
====================================
6676

6777
There are generally two cases for hotkey event reporting:
78+
6879
i) For some laptops, when user presses the hotkey, a scancode will be
6980
generated and sent to user space through the input device created by
7081
the keyboard driver as a key type input event, with proper remap, the
71-
following key code will appear to user space:
82+
following key code will appear to user space::
7283

7384
EV_KEY, KEY_BRIGHTNESSUP
7485
EV_KEY, KEY_BRIGHTNESSDOWN
@@ -84,23 +95,27 @@ ii) For some laptops, the press of the hotkey will not generate the
8495
notify value it received and send the event to user space through the
8596
input device it created:
8697

98+
===== ==================
8799
event keycode
100+
===== ==================
88101
0x86 KEY_BRIGHTNESSUP
89102
0x87 KEY_BRIGHTNESSDOWN
90103
etc.
104+
===== ==================
91105

92106
so this would lead to the same effect as case i) now.
93107

94108
Once user space tool receives this event, it can modify the backlight
95109
level through the sysfs interface.
96110

97-
3 Change backlight level in the kernel
111+
Change backlight level in the kernel
112+
====================================
98113

99114
This works for machines covered by case ii) in Section 2. Once the driver
100115
received a notification, it will set the backlight level accordingly. This does
101116
not affect the sending of event to user space, they are always sent to user
102117
space regardless of whether or not the video module controls the backlight level
103118
directly. This behaviour can be controlled through the brightness_switch_enabled
104-
module parameter as documented in admin-guide/kernel-parameters.rst. It is recommended to
105-
disable this behaviour once a GUI environment starts up and wants to have full
106-
control of the backlight level.
119+
module parameter as documented in admin-guide/kernel-parameters.rst. It is
120+
recommended to disable this behaviour once a GUI environment starts up and
121+
wants to have full control of the backlight level.

0 commit comments

Comments
 (0)