From patchwork Fri Nov 25 22:28:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 127760 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 1C12F1007D1 for ; Sat, 26 Nov 2011 09:29:04 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RU4GN-00010D-2m; Fri, 25 Nov 2011 22:28:55 +0000 Received: from mail.tpi.com ([70.99.223.143]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RU4GL-000108-Iv for kernel-team@lists.ubuntu.com; Fri, 25 Nov 2011 22:28:53 +0000 Received: from [10.0.2.5] (host-174-45-40-59.gdj-co.client.bresnan.net [174.45.40.59]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.tpi.com (Postfix) with ESMTP id 13D9A2FEF7A; Fri, 25 Nov 2011 14:27:55 -0800 (PST) Message-ID: <4ED016A2.4000805@canonical.com> Date: Fri, 25 Nov 2011 15:28:50 -0700 From: Tim Gardner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15 MIME-Version: 1.0 To: Kamal Mostafa Subject: ACK: [Oneiric SRU] drm/i915: Fix inconsistent backlight level during disabled References: <1322259884.4443.102.camel@fourier> In-Reply-To: <1322259884.4443.102.camel@fourier> Cc: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com On 11/25/2011 03:24 PM, Kamal Mostafa wrote: > Please consider cherry-picking this patch from torvalds/linux.git for > Oneiric: > > drm/i915: Fix inconsistent backlight level during disabled > 04b38670cf46c096705f24e92a8747d1ab89e53c > > It applies cleanly, and fixes > > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652 > screensaver backlight stuck off, system looks hung > > which affects a large number of users. The patch is Cc: so > will land in Oneiric anyway, but it would be nice to get this one sooner > rather than later. > > -Kamal > > Patch attached for convenient review. From 04b38670cf46c096705f24e92a8747d1ab89e53c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 16 Nov 2011 10:58:03 +0100 Subject: [PATCH] drm/i915: Fix inconsistent backlight level during disabled When the brightness property is inquired while the backlight is disabled, the driver returns a wrong value (zero) because it probes the value after the backlight was turned off. This caused a black screen even after the backlight is enabled again. It should return the internal backlight_level instead, so that it won't be influenced by the backlight-enable state. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=41926 BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652 Tested-by: Kamal Mostafa Cc: Alex Davis Cc: Signed-off-by: Takashi Iwai Signed-off-by: Keith Packard --- drivers/gpu/drm/i915/intel_panel.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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 = { -- 1.7.0.4