From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] drm/i915: Fix eDP blank screen after S3 resume on HP desktops Date: Wed, 20 Jun 2012 11:21:11 +0200 Message-ID: References: <20120620080512.GA7170@phenom.ffwll.local> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 17B589E782 for ; Wed, 20 Jun 2012 02:21:13 -0700 (PDT) In-Reply-To: <20120620080512.GA7170@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org, John Sundragon Waitz , Rodrigo Vivi List-Id: intel-gfx@lists.freedesktop.org At Wed, 20 Jun 2012 10:05:12 +0200, Daniel Vetter wrote: > > On Wed, Jun 20, 2012 at 09:17:41AM +0200, Takashi Iwai wrote: > > This patch fixes the problem on some HP desktop machines with eDP > > which give blank screens after S3 resume. > > > > The problem looks like a timing issue. Although BLC_PWM_CPU_CTL > > register is already restored at the beginning of resume, it doesn't > > seem to take effect. Simply re-issuing the register write restores > > the backlight gracefully. > > > > Tested with 3.5-rc3 kernel. > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49233 > > > > Signed-off-by: Takashi Iwai > > This patch looks very fishy as-is, simply because I don't like adding > random calls to random functions at pretty much random places without any > hint why it works. It's difficult to know exactly why it works. We can only guess, but nothing more than that, just like between husband and wife :) > Just a few weeks ago we've had tons of fun with writes > that don't stick when the ring isn't yet set up. Can you please check with > a bunch of printks what exactly happens to the value of BLC_PWM_CPU_CTL? > I.e. whether the write doesn't stick or whether it gets reset somewhere > between the register restore functions and the new place. The register value is already set, and not touched after that. I've already checked. > I suspect the opregion_init call could allow the bios to frob with these > registers. If that's the case, the patch is missing a comment that to that > effect. Right. That's also my suspect. > Essentially I want to know why this place here works and why not move the > call a few lines up or down. A few lines down works definitely. Even just writing to sysfs works. A few lines up, well, I need to check where is the border line. Takashi > -Daniel > > > --- > > drivers/gpu/drm/i915/i915_drv.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c > > index 9fe9ebe..2ba1350 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.c > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > @@ -658,6 +658,9 @@ static int i915_drm_thaw(struct drm_device *dev) > > > > intel_opregion_init(dev); > > > > + if (dev_priv->backlight) > > + backlight_update_status(dev_priv->backlight); > > + > > dev_priv->modeset_on_lid = 0; > > > > console_lock(); > > -- > > 1.7.10.4 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Daniel Vetter > Mail: daniel@ffwll.ch > Mobile: +41 (0)79 365 57 48 >