From patchwork Fri Mar 20 09:00:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 6054771 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EC50DBF90F for ; Fri, 20 Mar 2015 09:00:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07D412050E for ; Fri, 20 Mar 2015 09:00:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C47CD204D5 for ; Fri, 20 Mar 2015 09:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751664AbbCTJAM (ORCPT ); Fri, 20 Mar 2015 05:00:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45789 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbbCTJAJ (ORCPT ); Fri, 20 Mar 2015 05:00:09 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2K905gD029699 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 20 Mar 2015 05:00:05 -0400 Received: from shalem.localdomain.com (vpn1-7-109.ams2.redhat.com [10.36.7.109]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2K902FF003147; Fri, 20 Mar 2015 05:00:03 -0400 From: Hans de Goede To: "Rafael J. Wysocki" Cc: Aaron Lu , linux-acpi@vger.kernel.org, Hans de Goede , Stepan Bujnak Subject: [PATCH] acpi: video: Add force native backlight quirk for Lenovo Ideapad Z570 Date: Fri, 20 Mar 2015 10:00:00 +0100 Message-Id: <1426842000-560-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1426842000-560-1-git-send-email-hdegoede@redhat.com> References: <1426842000-560-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Lenovo Ideapad Z570 (which is an Acer in disguise like some other Ideapads) has a broken acpi_video interface, this was fixed in commmit a11d342fb8 ("ACPI / video: force vendor backlight on Lenovo Ideapad Z570"). Which stops acpi_video from registering a backlight interface, but this is only a partial fix, because for people who have the ideapad-laptop module installed that module will now register a backlight interface, which also does not work, so we need to use the native intel_backlight interface. The Lenovo Ideapad 570 is a pre-win8 laptop / too old for the acpi-video code to automatically prefer the native backlight interface, so add a quirk for it. This commit also removes the previous incomplete fix. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1187004 Tested-by: Be Cc: Stepan Bujnak Signed-off-by: Hans de Goede --- drivers/acpi/video.c | 17 +++++++++++++++++ drivers/acpi/video_detect.c | 8 -------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 2f45dca..cc79d3f 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -425,6 +425,12 @@ static int __init video_disable_native_backlight(const struct dmi_system_id *d) return 0; } +static int __init video_enable_native_backlight(const struct dmi_system_id *d) +{ + use_native_backlight_dmi = NATIVE_BACKLIGHT_ON; + return 0; +} + static struct dmi_system_id video_dmi_table[] __initdata = { /* * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 @@ -566,6 +572,17 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"), }, }, + + /* Non win8 machines which need native backlight nevertheless */ + { + /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */ + .callback = video_enable_native_backlight, + .ident = "Lenovo Ideapad Z570", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "102434U"), + }, + }, {} }; diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 27c4349..c42feb2 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c @@ -174,14 +174,6 @@ static struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 5737"), }, }, - { - .callback = video_detect_force_vendor, - .ident = "Lenovo IdeaPad Z570", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Ideapad Z570"), - }, - }, { }, };