aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2019-04-24 13:53:06 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-04-25 17:07:20 -0400
commit7fb091f806c55da593b93bc858d81203a9597257 (patch)
treefc235b273d213e74c31ed3ca4638b00b1f8aef6e
parent7fe19072df5555425268f9452059d3c514c6780f (diff)
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 <changbin.du@gmail.com> Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/firmware-guide/acpi/index.rst1
-rw-r--r--Documentation/firmware-guide/acpi/video_extension.rst (renamed from Documentation/acpi/video_extension.txt)83
2 files changed, 50 insertions, 34 deletions
diff --git a/Documentation/firmware-guide/acpi/index.rst b/Documentation/firmware-guide/acpi/index.rst
index 0e60f4b7129a..ae609eec4679 100644
--- a/Documentation/firmware-guide/acpi/index.rst
+++ b/Documentation/firmware-guide/acpi/index.rst
@@ -23,3 +23,4 @@ ACPI Support
23 i2c-muxes 23 i2c-muxes
24 acpi-lid 24 acpi-lid
25 lpit 25 lpit
26 video_extension
diff --git a/Documentation/acpi/video_extension.txt b/Documentation/firmware-guide/acpi/video_extension.rst
index 79bf6a4921be..099b8607e07b 100644
--- a/Documentation/acpi/video_extension.txt
+++ b/Documentation/firmware-guide/acpi/video_extension.rst
@@ -1,5 +1,8 @@
1.. SPDX-License-Identifier: GPL-2.0
2
3=====================
1ACPI video extensions 4ACPI video extensions
2~~~~~~~~~~~~~~~~~~~~~ 5=====================
3 6
4This driver implement the ACPI Extensions For Display Adapters for 7This driver implement the ACPI Extensions For Display Adapters for
5integrated graphics devices on motherboard, as specified in ACPI 2.0 8integrated graphics devices on motherboard, as specified in ACPI 2.0
@@ -8,9 +11,10 @@ defining the video POST device, retrieving EDID information or to
8setup a video output, etc. Note that this is an ref. implementation 11setup a video output, etc. Note that this is an ref. implementation
9only. It may or may not work for your integrated video device. 12only. It may or may not work for your integrated video device.
10 13
11The ACPI video driver does 3 things regarding backlight control: 14The ACPI video driver does 3 things regarding backlight control.
12 15
131 Export a sysfs interface for user space to control backlight level 16Export a sysfs interface for user space to control backlight level
17==================================================================
14 18
15If the ACPI table has a video device, and acpi_backlight=vendor kernel 19If the ACPI table has a video device, and acpi_backlight=vendor kernel
16command line is not present, the driver will register a backlight device 20command line is not present, the driver will register a backlight device
@@ -22,36 +26,41 @@ The backlight sysfs interface has a standard definition here:
22Documentation/ABI/stable/sysfs-class-backlight. 26Documentation/ABI/stable/sysfs-class-backlight.
23 27
24And what ACPI video driver does is: 28And what ACPI video driver does is:
25actual_brightness: on read, control method _BQC will be evaluated to 29
26get the brightness level the firmware thinks it is at; 30actual_brightness:
27bl_power: not implemented, will set the current brightness instead; 31 on read, control method _BQC will be evaluated to
28brightness: on write, control method _BCM will run to set the requested 32 get the brightness level the firmware thinks it is at;
29brightness level; 33bl_power:
30max_brightness: Derived from the _BCL package(see below); 34 not implemented, will set the current brightness instead;
31type: firmware 35brightness:
36 on write, control method _BCM will run to set the requested brightness level;
37max_brightness:
38 Derived from the _BCL package(see below);
39type:
40 firmware
32 41
33Note that ACPI video backlight driver will always use index for 42Note that ACPI video backlight driver will always use index for
34brightness, actual_brightness and max_brightness. So if we have 43brightness, actual_brightness and max_brightness. So if we have
35the following _BCL package: 44the following _BCL package::
36 45
37Method (_BCL, 0, NotSerialized) 46 Method (_BCL, 0, NotSerialized)
38{
39 Return (Package (0x0C)
40 { 47 {
41 0x64, 48 Return (Package (0x0C)
42 0x32, 49 {
43 0x0A, 50 0x64,
44 0x14, 51 0x32,
45 0x1E, 52 0x0A,
46 0x28, 53 0x14,
47 0x32, 54 0x1E,
48 0x3C, 55 0x28,
49 0x46, 56 0x32,
50 0x50, 57 0x3C,
51 0x5A, 58 0x46,
52 0x64 59 0x50,
53 }) 60 0x5A,
54} 61 0x64
62 })
63 }
55 64
56The first two levels are for when laptop are on AC or on battery and are 65The first two levels are for when laptop are on AC or on battery and are
57not used by Linux currently. The remaining 10 levels are supported levels 66not 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
62the range of available brightness levels is from 0 to 9 (max_brightness) 71the range of available brightness levels is from 0 to 9 (max_brightness)
63inclusive. 72inclusive.
64 73
652 Notify user space about hotkey event 74Notify user space about hotkey event
75====================================
66 76
67There are generally two cases for hotkey event reporting: 77There are generally two cases for hotkey event reporting:
78
68i) For some laptops, when user presses the hotkey, a scancode will be 79i) For some laptops, when user presses the hotkey, a scancode will be
69 generated and sent to user space through the input device created by 80 generated and sent to user space through the input device created by
70 the keyboard driver as a key type input event, with proper remap, the 81 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::
72 83
73 EV_KEY, KEY_BRIGHTNESSUP 84 EV_KEY, KEY_BRIGHTNESSUP
74 EV_KEY, KEY_BRIGHTNESSDOWN 85 EV_KEY, KEY_BRIGHTNESSDOWN
@@ -84,23 +95,27 @@ ii) For some laptops, the press of the hotkey will not generate the
84 notify value it received and send the event to user space through the 95 notify value it received and send the event to user space through the
85 input device it created: 96 input device it created:
86 97
98 ===== ==================
87 event keycode 99 event keycode
100 ===== ==================
88 0x86 KEY_BRIGHTNESSUP 101 0x86 KEY_BRIGHTNESSUP
89 0x87 KEY_BRIGHTNESSDOWN 102 0x87 KEY_BRIGHTNESSDOWN
90 etc. 103 etc.
104 ===== ==================
91 105
92so this would lead to the same effect as case i) now. 106so this would lead to the same effect as case i) now.
93 107
94Once user space tool receives this event, it can modify the backlight 108Once user space tool receives this event, it can modify the backlight
95level through the sysfs interface. 109level through the sysfs interface.
96 110
973 Change backlight level in the kernel 111Change backlight level in the kernel
112====================================
98 113
99This works for machines covered by case ii) in Section 2. Once the driver 114This works for machines covered by case ii) in Section 2. Once the driver
100received a notification, it will set the backlight level accordingly. This does 115received a notification, it will set the backlight level accordingly. This does
101not affect the sending of event to user space, they are always sent to user 116not affect the sending of event to user space, they are always sent to user
102space regardless of whether or not the video module controls the backlight level 117space regardless of whether or not the video module controls the backlight level
103directly. This behaviour can be controlled through the brightness_switch_enabled 118directly. This behaviour can be controlled through the brightness_switch_enabled
104module parameter as documented in admin-guide/kernel-parameters.rst. It is recommended to 119module parameter as documented in admin-guide/kernel-parameters.rst. It is
105disable this behaviour once a GUI environment starts up and wants to have full 120recommended to disable this behaviour once a GUI environment starts up and
106control of the backlight level. 121wants to have full control of the backlight level.