From patchwork Fri Sep 20 18:03:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth Forshee X-Patchwork-Id: 276584 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 580382C0126 for ; Sat, 21 Sep 2013 04:04:03 +1000 (EST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VN53a-0001od-PQ; Fri, 20 Sep 2013 18:03:54 +0000 Received: from mail-yh0-f53.google.com ([209.85.213.53]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1VN53R-0001oN-IN for kernel-team@lists.ubuntu.com; Fri, 20 Sep 2013 18:03:45 +0000 Received: by mail-yh0-f53.google.com with SMTP id b20so292537yha.40 for ; Fri, 20 Sep 2013 11:03:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Fs8WqoT+k+BqrqTJTVWqiM3NIkFo0JxxKMCw1gYQ+Is=; b=dyebw46/tPoHV58B5AMFLZ3KAMRu/5CzS+wBVL8qQt+IFtfMvIatmHUeOT987PJWZy KuZjBb82NQeNfJOoscPQhPMVthQmasLEQkSBwv0Po2eMPH2rQ0q0jWWrEVFexXAg5ojk q5zgtjjgn/PVLLZdeDsHPAhehFbFQ7BPLgMtTm+hzFJAp1e5OrMrQPgRTM+bMTg2S38R zX+r5NYawKfpyWlBPgv08mqEBkv+H2QqJhwwJ/pKdO0bbdOb8P160dySPbCG6C8c2Jgx NetvNQzqv3v5QFEsk+S4Exs6S/dd9+5p3jUAVTOB4vh4cR2+PvGm1GbRVF0P1AF968IK Gm6Q== X-Gm-Message-State: ALoCoQmDfjKvgd8UJODV92LzLCd+/BwAMx/48+l22EybNe/MCm+agwOShgsO3+zfFC9iG6kYYSBd X-Received: by 10.236.83.69 with SMTP id p45mr7936144yhe.40.1379700224940; Fri, 20 Sep 2013 11:03:44 -0700 (PDT) Received: from localhost ([204.57.119.28]) by mx.google.com with ESMTPSA id e42sm19663763yhe.14.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 20 Sep 2013 11:03:44 -0700 (PDT) From: Seth Forshee To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][Saucy] UBUNTU: SAUCE: (no-up) ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Date: Fri, 20 Sep 2013 13:03:41 -0500 Message-Id: <1379700221-3781-2-git-send-email-seth.forshee@canonical.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1379700221-3781-1-git-send-email-seth.forshee@canonical.com> References: <1379700221-3781-1-git-send-email-seth.forshee@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com The AML implementation for brightness control on several ThinkPads contains a workaround to meet a Windows 8 requirement of 101 brightness levels [1]. The implementation is flawed, as only 16 of the brighness values reported by _BCL affect a change in brightness. _BCM silently discards the rest of the values. Disabling Windows 8 compatibility on these machines reverts them to the old behavior, making _BCL only report the 16 brightness levels which actually work. Add a quirk to do this along with a dmi callback to disable Win8 compatibility. [1] http://msdn.microsoft.com/en-us/library/windows/hardware/jj128256.aspx BugLink: http://bugs.launchpad.net/bugs/1183856 Signed-off-by: Seth Forshee --- drivers/acpi/blacklist.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index cb96296..6023e51 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c @@ -193,6 +193,13 @@ static int __init dmi_disable_osi_win7(const struct dmi_system_id *d) return 0; } +static int __init dmi_disable_osi_win8(const struct dmi_system_id *d) +{ + printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident); + acpi_osi_setup("!Windows 2012"); + return 0; +} + static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { { .callback = dmi_disable_osi_vista, @@ -269,6 +276,77 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { }, /* + * The following Lenovo models have a broken workaround in the + * acpi_video backlight implementation to meet the Windows 8 + * requirement of 101 backlight levels. Reverting to pre-Win8 + * behavior fixes the problem. + */ + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad L430", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad L430"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad T430", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T430"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad T430s", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T430s"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad T530", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T530"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad W530", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad X1 Carbon", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad X230", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X230"), + }, + }, + { + .callback = dmi_disable_osi_win8, + .ident = "Lenovo ThinkPad Edge E330", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Edge E330"), + }, + }, + + /* * BIOS invocation of _OSI(Linux) is almost always a BIOS bug. * Linux ignores it, except for the machines enumerated below. */