From patchwork Tue Jul 16 17:08:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Garrett X-Patchwork-Id: 2828224 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BBEC09F7D6 for ; Tue, 16 Jul 2013 17:08:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B02CB20277 for ; Tue, 16 Jul 2013 17:08:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D7B402028D for ; Tue, 16 Jul 2013 17:08:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BF179E6CB5 for ; Tue, 16 Jul 2013 10:08:49 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1lp0150.outbound.protection.outlook.com [207.46.163.150]) by gabe.freedesktop.org (Postfix) with ESMTP id 3627AE6C69; Tue, 16 Jul 2013 10:08:20 -0700 (PDT) Received: from BY2PR05MB222.namprd05.prod.outlook.com (10.242.41.151) by BY2PR05MB223.namprd05.prod.outlook.com (10.242.41.141) with Microsoft SMTP Server (TLS) id 15.0.731.12; Tue, 16 Jul 2013 17:08:16 +0000 Received: from BY2PR05MB222.namprd05.prod.outlook.com ([169.254.13.71]) by BY2PR05MB222.namprd05.prod.outlook.com ([169.254.13.71]) with mapi id 15.00.0731.000; Tue, 16 Jul 2013 17:08:16 +0000 From: Matthew Garrett To: Igor Gnatenko Thread-Topic: [Update][PATCH] ACPI / video / i915: Remove ACPI backlight if firmware expects Windows 8 Thread-Index: AQHOf2EOf9xYEw7JIEmM0Xd7JOJCBJlnUxkAgAA8Q4A= Date: Tue, 16 Jul 2013 17:08:16 +0000 Message-ID: <1373994495.9314.1.camel@x230> References: <1370818899-8595-1-git-send-email-matthew.garrett@nebula.com> <12270512.1rshgKaUug@vostro.rjw.lan> <51DA7190.6080208@gmail.com> <1683364.CdnoW81WLH@vostro.rjw.lan> <1373981554.1956.5.camel@ThinkPad-X230.localdomain> In-Reply-To: <1373981554.1956.5.camel@ThinkPad-X230.localdomain> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.255.84.4] x-forefront-prvs: 09090B6B69 x-forefront-antispam-report: SFV:NSPM; SFS:(24454002)(377424004)(199002)(189002)(76482001)(76786001)(50986001)(56776001)(16406001)(81342001)(69226001)(54356001)(83072001)(31966008)(74876001)(47446002)(33716001)(46102001)(63696002)(80022001)(56816003)(79102001)(47976001)(74366001)(77982001)(74706001)(54316002)(59766001)(49866001)(65816001)(51856001)(81542001)(33646001)(47736001)(77096001)(74502001)(74662001)(53806001)(76796001)(4396001); DIR:OUT; SFP:; SCL:1; SRVR:BY2PR05MB223; H:BY2PR05MB222.namprd05.prod.outlook.com; CLIP:10.255.84.4; RD:InfoNoRecords; A:1; MX:1; LANG:en; Content-ID: <6DB627994CA01C41BF352B8A36AB0F73@namprd05.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: nebula.com Cc: "seth.forshee@canonical.com" , "daniel.vetter@ffwll.ch" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Rafael J. Wysocki" , "linux-acpi@vger.kernel.org" , "joeyli.kernel@gmail.com" , Aaron Lu , "lenb@kernel.org" Subject: Re: [Intel-gfx] [Update][PATCH] ACPI / video / i915: Remove ACPI backlight if firmware expects Windows 8 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 On Tue, 2013-07-16 at 17:32 +0400, Igor Gnatenko wrote: > Hmm. I found regression in user-space. In GNOME (maybe and other DEs) we no longer see switch status of backlight. Yeah, I can duplicate that. Rafael, we have to call acpi_video_init_brightness() even if we're not going to initialise the backlight - Thinkpads seem to use this as the trigger for enabling ACPI notifications rather than handling it in firmware. This seems to do the job: struct pci_dev *pdev; @@ -909,9 +912,6 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) static int count = 0; char *name; - result = acpi_video_init_brightness(device); - if (result) - return; name = kasprintf(GFP_KERNEL, "acpi_video%d", count); if (!name) return; Tested-by: Igor Gnatenko diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 01b1a25..71865f7 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -900,6 +900,9 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) device->cap._DDC = 1; } + if (acpi_video_init_brightness(device)) + return; + if (acpi_video_verify_backlight_support()) { struct backlight_properties props;