From patchwork Wed Jul 17 11:38:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 2828546 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 6AC719F9A0 for ; Wed, 17 Jul 2013 11:29:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5078D2017A for ; Wed, 17 Jul 2013 11:29:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3AFFF20171 for ; Wed, 17 Jul 2013 11:29:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17FF8E6746 for ; Wed, 17 Jul 2013 04:29:26 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from hydra.sisk.pl (hydra.sisk.pl [212.160.235.94]) by gabe.freedesktop.org (Postfix) with ESMTP id 575F7E6746; Wed, 17 Jul 2013 04:28:16 -0700 (PDT) Received: from vostro.rjw.lan (afdd63.neoplus.adsl.tpnet.pl [95.49.81.63]) by hydra.sisk.pl (Postfix) with ESMTPSA id 1D71AE3DB9; Wed, 17 Jul 2013 13:23:53 +0200 (CEST) From: "Rafael J. Wysocki" To: Igor Gnatenko Date: Wed, 17 Jul 2013 13:38:10 +0200 Message-ID: <1953381.pqik7pbieu@vostro.rjw.lan> User-Agent: KMail/4.9.5 (Linux/3.10.0+; KDE/4.9.5; x86_64; ; ) In-Reply-To: <1374038198.1884.1.camel@ThinkPad-X230.localdomain> References: <1370818899-8595-1-git-send-email-matthew.garrett@nebula.com> <2132122.eIEvjmIrrj@vostro.rjw.lan> <1374038198.1884.1.camel@ThinkPad-X230.localdomain> MIME-Version: 1.0 Cc: Matthew Garrett , "linux-acpi@vger.kernel.org" , "daniel.vetter@ffwll.ch" , "intel-gfx@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "seth.forshee@canonical.com" , "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 Wednesday, July 17, 2013 09:16:38 AM Igor Gnatenko wrote: > On Wed, 2013-07-17 at 00:01 +0200, Rafael J. Wysocki wrote: > > On Tuesday, July 16, 2013 05:08:16 PM Matthew Garrett wrote: > > > 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: > > > > Igor, does this additional patch from Matthew help? > Yes. With this patch I have backlight switch indicator on my ThinkPad X230. OK, thanks for the confirmation. Can you please also check if applying the appended patch on top of the Matthew's one changes anything (ie. things still work)? Rafael Tested-by: Igor Gnatenko --- drivers/acpi/video.c | 5 +++++ 1 file changed, 5 insertions(+) Index: linux-pm/drivers/acpi/video.c =================================================================== --- linux-pm.orig/drivers/acpi/video.c +++ linux-pm/drivers/acpi/video.c @@ -957,6 +957,11 @@ static void acpi_video_device_find_cap(s if (result) printk(KERN_ERR PREFIX "Create sysfs link\n"); + } else { + /* Remove the brightness object. */ + kfree(device->brightness->levels); + kfree(device->brightness); + device->brightness = NULL; } }