From patchwork Thu Dec 10 12:46:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 40802 X-Patchwork-Delegate: stefan.bader@canonical.com 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 564B9B6EEC for ; Thu, 10 Dec 2009 23:46:18 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1NIiPJ-0000kU-81; Thu, 10 Dec 2009 12:46:09 +0000 Received: from mail-pz0-f186.google.com ([209.85.222.186]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1NIiPD-0000iG-Hp for kernel-team@lists.ubuntu.com; Thu, 10 Dec 2009 12:46:03 +0000 Received: by pzk16 with SMTP id 16so3984839pzk.18 for ; Thu, 10 Dec 2009 04:46:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.142.247.23 with SMTP id u23mr2233796wfh.240.1260449162240; Thu, 10 Dec 2009 04:46:02 -0800 (PST) In-Reply-To: <4B20DA55.1070407@canonical.com> References: <91b198a70912100203u73f4ad67x209e67fb052f5046@mail.gmail.com> <4B20DA55.1070407@canonical.com> Date: Thu, 10 Dec 2009 20:46:02 +0800 X-Google-Sender-Auth: ff0ee52ae3d83a36 Message-ID: <91b198a70912100446t409ab1e7k6715b356570493f1@mail.gmail.com> Subject: Re: [PATCH] UBUNTU: [Karmic SRU] backlight failed after suspend to ram on IBM X40 From: AceLan Kao To: kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.8 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 Dear Stefan, My mistake, I re-attach the file. Indeed, the patch is cherry-picked from the upstream kernel, and it's hash value is 0eb96d6ed38430b72897adde58f5477a6b71757a Best regards, AceLan Kao. 2009/12/10 Stefan Bader > AceLan Kao wrote: > > Hi, > > > > SRU Justification: > > > > IMPACT: Turns out some machines, like the ThinkPad X40 don't come back if > > you don't save/restore this register. > > > > FIX: The patch save and restore one more value of the register while > > suspending and resuming. > > > > TEST: User on the launchpad acked the patch works for him. > > > > git://kernel.ubuntu.com/acelan/ubuntu-karmic.git lp292256 > > > > Best regards, > > AceLan Kao. > > > > > Looks, like you accidentally picked the swapfile. Beside of that, is that > patch new and if so has it been sent to upstream CC: stable@kernel.org? > > -Stefan > Acked-by: Andy Whitcroft From 43644cbe252d555de423202853f4855693e4316a Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Wed, 14 Oct 2009 12:33:41 -0700 Subject: [PATCH] UBUNTU: [Karmic SRU] backlight failed after suspend to ram on IBM X40 BugLink: https://bugs.edge.launchpad.net/ubuntu/+source/linux/+bug/292256 drm/i915: save/restore BLC histogram control reg across suspend/resume Turns out some machines, like the ThinkPad X40 don't come back if you don't save/restore this register. Signed-off-by: Jesse Barnes Signed-off-by: Eric Anholt (cherry picked from commit 0eb96d6ed38430b72897adde58f5477a6b71757a) Signed-off-by: AceLan Kao --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_reg.h | 2 ++ drivers/gpu/drm/i915/i915_suspend.c | 2 ++ 3 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 88b3eff..602dd76 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -264,6 +264,7 @@ typedef struct drm_i915_private { u32 saveDSPASURF; u32 saveDSPATILEOFF; u32 savePFIT_PGM_RATIOS; + u32 saveBLC_HIST_CTL; u32 saveBLC_PWM_CTL; u32 saveBLC_PWM_CTL2; u32 saveFPB0; diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c017fa1..9917749 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -915,6 +915,8 @@ #define BACKLIGHT_DUTY_CYCLE_SHIFT (0) #define BACKLIGHT_DUTY_CYCLE_MASK (0xffff) +#define BLC_HIST_CTL 0x61260 + /* TV port control */ #define TV_CTL 0x68000 /** Enables the TV encoder */ diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 1d04e19..2e4aca6 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -416,6 +416,7 @@ int i915_save_state(struct drm_device *dev) dev_priv->savePP_CONTROL = I915_READ(PP_CONTROL); dev_priv->savePFIT_PGM_RATIOS = I915_READ(PFIT_PGM_RATIOS); dev_priv->saveBLC_PWM_CTL = I915_READ(BLC_PWM_CTL); + dev_priv->saveBLC_HIST_CTL = I915_READ(BLC_HIST_CTL); if (IS_I965G(dev)) dev_priv->saveBLC_PWM_CTL2 = I915_READ(BLC_PWM_CTL2); if (IS_MOBILE(dev) && !IS_I830(dev)) @@ -560,6 +561,7 @@ int i915_restore_state(struct drm_device *dev) I915_WRITE(PFIT_PGM_RATIOS, dev_priv->savePFIT_PGM_RATIOS); I915_WRITE(BLC_PWM_CTL, dev_priv->saveBLC_PWM_CTL); + I915_WRITE(BLC_HIST_CTL, dev_priv->saveBLC_HIST_CTL); I915_WRITE(PP_ON_DELAYS, dev_priv->savePP_ON_DELAYS); I915_WRITE(PP_OFF_DELAYS, dev_priv->savePP_OFF_DELAYS); I915_WRITE(PP_DIVISOR, dev_priv->savePP_DIVISOR); -- 1.6.3.3