From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754868Ab1KPIBP (ORCPT ); Wed, 16 Nov 2011 03:01:15 -0500 Received: from cantor2.suse.de ([195.135.220.15]:45462 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754687Ab1KPIBO (ORCPT ); Wed, 16 Nov 2011 03:01:14 -0500 Date: Wed, 16 Nov 2011 09:01:12 +0100 Message-ID: From: Takashi Iwai To: Kamal Mostafa Cc: Alex Davis , Keith Packard , "mjg@redhat.com" , intel-gfx@lists.freedesktop.org, "linux-kernel@vger.kernel.org" Subject: Re: [Intel-gfx] [PATCH] i915: Fix bug where screen brightness is not restored In-Reply-To: <1321394084.32358.17.camel@fourier> References: <1321324952.13838.YahooMailNeo@web130105.mail.mud.yahoo.com> <1321387118.27038.17.camel@fourier> <1321394084.32358.17.camel@fourier> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Tue, 15 Nov 2011 13:54:44 -0800, Kamal Mostafa wrote: > > On Tue, 2011-11-15 at 21:28 +0100, Takashi Iwai wrote: > > My rough guess is the inconsistency of property taken during the > > backlight disabled. How about the patch below (untested!) in addition > > to the fix in 3.2? > > > > > > Takashi > > Yes Takashi, your patch below (plus the already committed fix[0]) does > indeed fix the problem[1] for me. Thanks! > > Tested-by: Kamal Mostafa OK, I'll resend the patch with proper sign-off, etc. thanks, Takashi > > -Kamal > > [0] f52c619a590fa75276c07dfcaf380dee53e4ea4c > drm/i915/panel: Always record the backlight level again (but cleverly) > > [1] https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652 > > > > > --- > > diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c > > index 499d4c0..21f60b7 100644 > > --- a/drivers/gpu/drm/i915/intel_panel.c > > +++ b/drivers/gpu/drm/i915/intel_panel.c > > @@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd) > > static int intel_panel_get_brightness(struct backlight_device *bd) > > { > > struct drm_device *dev = bl_get_data(bd); > > - return intel_panel_get_backlight(dev); > > + struct drm_i915_private *dev_priv = dev->dev_private; > > + return dev_priv->backlight_level; > > } > > > > static const struct backlight_ops intel_panel_bl_ops = { > > >