From patchwork Tue Mar 3 07:39:10 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: 5920441 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F198F9F380 for ; Tue, 3 Mar 2015 07:39:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 268462028D for ; Tue, 3 Mar 2015 07:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19DDA202B8 for ; Tue, 3 Mar 2015 07:39:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632AbbCCHjS (ORCPT ); Tue, 3 Mar 2015 02:39:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37798 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534AbbCCHjS (ORCPT ); Tue, 3 Mar 2015 02:39:18 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t237dGf4026631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 3 Mar 2015 02:39:16 -0500 Received: from shalem.localdomain.com (vpn1-7-20.ams2.redhat.com [10.36.7.20]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t237dBb7002645; Tue, 3 Mar 2015 02:39:14 -0500 From: Hans de Goede To: "Rafael J. Wysocki" Cc: Aaron Lu , Zhang Rui , linux-acpi@vger.kernel.org, Hans de Goede Subject: [RFC PATCH 2/2] acpi: video: Add force native backlight quirk for Lenovo Ideapad Z570 Date: Tue, 3 Mar 2015 08:39:10 +0100 Message-Id: <1425368350-4028-3-git-send-email-hdegoede@redhat.com> In-Reply-To: <1425368350-4028-1-git-send-email-hdegoede@redhat.com> References: <1425368350-4028-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 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 and is too old for the acpi-video code to automatically prefer the native backlight interface, so add a quirk for it. Note that this cannot be done with a quirk in the vendor backlight driver as is the normal way to fix this as the Z570 offers both acer-wmi and ideapad-laptop vendor backlight interfaces, so this would require the same quirk in 2 places which is the wrong thing to do. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1187004 Signed-off-by: Hans de Goede --- drivers/acpi/video.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 9817b52..70a7ec3 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -419,6 +419,12 @@ static int __init video_disable_native_backlight(const struct dmi_system_id *d) return 0; } +static int __init video_force_native_backlight(const struct dmi_system_id *d) +{ + use_native_backlight_dmi = 2; + return 0; +} + static struct dmi_system_id video_dmi_table[] __initdata = { /* * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 @@ -560,6 +566,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_force_native_backlight, + .ident = "Lenovo Ideapad Z570", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "102434U"), + }, + }, {} };