diff options
author | Aaron Lu <aaron.lu@intel.com> | 2013-07-16 01:08:05 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-17 20:08:16 -0400 |
commit | efaa14c7e981bdf8d3c8d39d3ed12bdc60faabb8 (patch) | |
tree | e393015f17feca2feec73e1a43d50967c4eb6b73 /drivers/acpi/video.c | |
parent | 8c5bd7adb2ce47e6aa39d17b2375f69b0c0aa255 (diff) |
ACPI / video: no automatic brightness changes by win8-compatible firmware
Starting from win8, MS backlight control driver will set bit 2 of the
parameter of control method _DOS, to inform firmware it should not
perform any automatic brightness changes. This mostly affects hotkey
notification deliver - if we do not set this bit, on hotkey press,
firmware may choose to adjust brightness level instead of sending out
notification and doing nothing.
So this patch sets bit 2 when calling _DOS so that GUIs can show the
notification window on hotkey press. This behavior change is only
necessary for win8 systems.
The MS document on win8 backlight control is here:
http://msdn.microsoft.com/en-US/library/windows/hardware/jj159305
References: https://bugzilla.kernel.org/show_bug.cgi?id=52951
References: https://bugzilla.kernel.org/show_bug.cgi?id=56711
Reported-by: Micael Dias <kam1kaz3@gmail.com>
Reported-by: Dan Garton <dan.garton@gmail.com>
Reported-by: Bob Ziuchkovski <bob.ziuchkovski@gmail.com>
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index e9d4bb60c35c..c9fa4621ed25 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1539,14 +1539,20 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video) | |||
1539 | 1539 | ||
1540 | /* acpi_video interface */ | 1540 | /* acpi_video interface */ |
1541 | 1541 | ||
1542 | /* | ||
1543 | * Win8 requires setting bit2 of _DOS to let firmware know it shouldn't | ||
1544 | * preform any automatic brightness change on receiving a notification. | ||
1545 | */ | ||
1542 | static int acpi_video_bus_start_devices(struct acpi_video_bus *video) | 1546 | static int acpi_video_bus_start_devices(struct acpi_video_bus *video) |
1543 | { | 1547 | { |
1544 | return acpi_video_bus_DOS(video, 0, 0); | 1548 | return acpi_video_bus_DOS(video, 0, |
1549 | acpi_video_backlight_quirks() ? 1 : 0); | ||
1545 | } | 1550 | } |
1546 | 1551 | ||
1547 | static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) | 1552 | static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) |
1548 | { | 1553 | { |
1549 | return acpi_video_bus_DOS(video, 0, 1); | 1554 | return acpi_video_bus_DOS(video, 0, |
1555 | acpi_video_backlight_quirks() ? 0 : 1); | ||
1550 | } | 1556 | } |
1551 | 1557 | ||
1552 | static void acpi_video_bus_notify(struct acpi_device *device, u32 event) | 1558 | static void acpi_video_bus_notify(struct acpi_device *device, u32 event) |