aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBrad Figg <brad.figg@canonical.com>2012-03-29 11:53:11 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-04-05 11:17:15 -0400
commitd0d11479237a7e83d2a5c3651440b05985ee698a (patch)
tree90c538a2eb9584a5dbfce33220d420126dd5089c /drivers
parent1476908b602791f6aa469a8f391fd3706a136354 (diff)
UBUNTU: SAUCE (no-up) Provide a param for allowing the BIOS to handle changing the brightness on AC/battery status changes.
BugLink: http://bugs.launchpad.net/bugs/949311 We currently carry a SAUCE patch which lets the OS handle the brightness levels automatically when connecting/disconnecting AC. There are some laptops (MSI Wind) for which this doesn't work. Provide a driver param which allows this behaviour to be overriden. Signed-off-by: Brad Figg <brad.figg@canonical.com> Acked-by: Colin King <colin.king@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/video.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 450a611b5fc..4c73f9433ec 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -74,6 +74,14 @@ static int brightness_switch_enabled = 1;
74module_param(brightness_switch_enabled, bool, 0644); 74module_param(brightness_switch_enabled, bool, 0644);
75 75
76/* 76/*
77 * The Default is to let the OS handle brightness autoswitching due to
78 * AC/battery status changes. On some laptops (MSI Wind) this doesn't
79 * work so we need a workaround.
80 */
81static int brightness_autoswitch_via_bios = 0;
82module_param(brightness_autoswitch_via_bios, bool, 0644);
83
84/*
77 * By default, we don't allow duplicate ACPI video bus devices 85 * By default, we don't allow duplicate ACPI video bus devices
78 * under the same VGA controller 86 * under the same VGA controller
79 */ 87 */
@@ -1422,7 +1430,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
1422 1430
1423static int acpi_video_bus_start_devices(struct acpi_video_bus *video) 1431static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
1424{ 1432{
1425 return acpi_video_bus_DOS(video, 0, 1); 1433 return acpi_video_bus_DOS(video, 0, !brightness_autoswitch_via_bios);
1426} 1434}
1427 1435
1428static int acpi_video_bus_stop_devices(struct acpi_video_bus *video) 1436static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)