aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBrad Figg <brad.figg@canonical.com>2012-03-29 08:53:11 -0700
committerLeann Ogasawara <leann.ogasawara@canonical.com>2012-05-21 06:46:13 -0700
commit7571ac989ab93e0e8be815786c15a4caedab9476 (patch)
tree6be2b9b6ae3e8c2fe60186b68ef7ce3c9ed72b51 /drivers
parente98f85811e0d6e463e027b8112d8c7b2466456e8 (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: Leann Ogasawara <leann.ogasawara@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 2ed59075ff1..559779deac6 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -73,6 +73,14 @@ static bool brightness_switch_enabled = 1;
module_param(brightness_switch_enabled, bool, 0644);
/*
+ * The Default is to let the OS handle brightness autoswitching due to
+ * AC/battery status changes. On some laptops (MSI Wind) this doesn't
+ * work so we need a workaround.
+ */
+static int brightness_autoswitch_via_bios = 0;
+module_param(brightness_autoswitch_via_bios, bool, 0644);
+
+/*
* By default, we don't allow duplicate ACPI video bus devices
* under the same VGA controller
*/
@@ -1423,7 +1431,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
{
- return acpi_video_bus_DOS(video, 0, 1);
+ return acpi_video_bus_DOS(video, 0, !brightness_autoswitch_via_bios);
}
static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)