All of lore.kernel.org
 help / color / mirror / Atom feed
From: mikko.rapeli@iki.fi
To: daniel@ffwll.ch
Cc: imre.deak@intel.com, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, daniel.vetter@intel.com,
	jani.nikula@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/i915: enable BIOS hang workaround for Lenovo T60 too
Date: Fri, 19 Jun 2015 17:17:54 +0000	[thread overview]
Message-ID: <hc9jyi.nq7c1w.1hge0yx-qmf@mail.kapsi.fi> (raw)
In-Reply-To: <20150619154431.GD25769@phenom.ffwll.local>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 3564 bytes --]

On Fri Jun 19 17:44:31 2015 GMT+0200, Daniel Vetter wrote:
> On Fri, Jun 19, 2015 at 08:17:55AM +0200, Mikko Rapeli wrote:
> > When trying to hibernate a Lenovo T60 the half moon led keeps blinking and
> > devices does not power off since commit da2bc1b9db3.
> > 
> > T60 chip details:
> > 
> > 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GM
> > L Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
> >         Subsystem: Lenovo ThinkPad R60/T60/X60 series
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
> > ping- SERR- FastB2B- DisINTx-
> >         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
> > <MAbort- >SERR- <PERR- INTx-
> >         Latency: 0
> >         Interrupt: pin A routed to IRQ 16
> >         Region 0: Memory at ee100000 (32-bit, non-prefetchable) [size=512K]
> >         Region 1: I/O ports at 1800 [size=8]
> >         Region 2: Memory at d0000000 (32-bit, prefetchable) [size=256M]
> >         Region 3: Memory at ee200000 (32-bit, non-prefetchable) [size=256K]
> >         Expansion ROM at <unassigned> [disabled]
> >         Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
> >                 Address: 00000000  Data: 0000
> >         Capabilities: [d0] Power Management version 2
> >                 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> >                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> >         Kernel driver in use: i915
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ec4d932..36e311e 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -641,11 +641,12 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
> >  	 * the device even though it's already in D3 and hang the machine. So
> >  	 * leave the device in D0 on those platforms and hope the BIOS will
> >  	 * power down the device properly. Platforms where this was seen:
> > -	 * Lenovo Thinkpad X301, X61s
> > +	 * Lenovo Thinkpad X301, X61s, T60
> >  	 */
> >  	if (!(hibernation &&
> >  	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
> > -	      INTEL_INFO(dev_priv)->gen == 4))
> > +	      ((INTEL_INFO(dev_priv)->gen == 3) ||
> > +	       (INTEL_INFO(dev_priv)->gen == 4)))
> 
> I wonder whether we shouldn't do this unconditionally for gen4 and earlier
> for Lenovo ... Anyway this needs Cc: stable@vger.kernel.org and is for
> Jani to pick up.


Yes, I also tought about enabling this for all older Lenovo devices but I don't know the hardware or chips and can't test so I let it be. Also reverting the original bug causing patch could be an option since this is affecting so many devices and users.
 
> Thanks for figuring out what's been broken here.

You're welcome.

-Mikko

> -Daniel
> 
> >  		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
> >  
> >  	return 0;
> > -- 
> > 2.1.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>

-- 
Sent from my Jollaÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠsåy«\x1e­æ¶\x17…\x01\x06­†ÛiÿÿðÃ\x0fí»\x1fè®\x0få’i\x7f

WARNING: multiple messages have this Message-ID (diff)
From: mikko.rapeli@iki.fi
To: daniel@ffwll.ch
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: enable BIOS hang workaround for Lenovo T60 too
Date: Fri, 19 Jun 2015 17:17:54 +0000	[thread overview]
Message-ID: <hc9jyi.nq7c1w.1hge0yx-qmf@mail.kapsi.fi> (raw)
In-Reply-To: <20150619154431.GD25769@phenom.ffwll.local>

On Fri Jun 19 17:44:31 2015 GMT+0200, Daniel Vetter wrote:
> On Fri, Jun 19, 2015 at 08:17:55AM +0200, Mikko Rapeli wrote:
> > When trying to hibernate a Lenovo T60 the half moon led keeps blinking and
> > devices does not power off since commit da2bc1b9db3.
> > 
> > T60 chip details:
> > 
> > 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GM
> > L Express Integrated Graphics Controller (rev 03) (prog-if 00 [VGA controller])
> >         Subsystem: Lenovo ThinkPad R60/T60/X60 series
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Step
> > ping- SERR- FastB2B- DisINTx-
> >         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort-
> > <MAbort- >SERR- <PERR- INTx-
> >         Latency: 0
> >         Interrupt: pin A routed to IRQ 16
> >         Region 0: Memory at ee100000 (32-bit, non-prefetchable) [size=512K]
> >         Region 1: I/O ports at 1800 [size=8]
> >         Region 2: Memory at d0000000 (32-bit, prefetchable) [size=256M]
> >         Region 3: Memory at ee200000 (32-bit, non-prefetchable) [size=256K]
> >         Expansion ROM at <unassigned> [disabled]
> >         Capabilities: [90] MSI: Enable- Count=1/1 Maskable- 64bit-
> >                 Address: 00000000  Data: 0000
> >         Capabilities: [d0] Power Management version 2
> >                 Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
> >                 Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
> >         Kernel driver in use: i915
> > 
> > Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index ec4d932..36e311e 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -641,11 +641,12 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
> >  	 * the device even though it's already in D3 and hang the machine. So
> >  	 * leave the device in D0 on those platforms and hope the BIOS will
> >  	 * power down the device properly. Platforms where this was seen:
> > -	 * Lenovo Thinkpad X301, X61s
> > +	 * Lenovo Thinkpad X301, X61s, T60
> >  	 */
> >  	if (!(hibernation &&
> >  	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
> > -	      INTEL_INFO(dev_priv)->gen == 4))
> > +	      ((INTEL_INFO(dev_priv)->gen == 3) ||
> > +	       (INTEL_INFO(dev_priv)->gen == 4)))
> 
> I wonder whether we shouldn't do this unconditionally for gen4 and earlier
> for Lenovo ... Anyway this needs Cc: stable@vger.kernel.org and is for
> Jani to pick up.


Yes, I also tought about enabling this for all older Lenovo devices but I don't know the hardware or chips and can't test so I let it be. Also reverting the original bug causing patch could be an option since this is affecting so many devices and users.
 
> Thanks for figuring out what's been broken here.

You're welcome.

-Mikko

> -Daniel
> 
> >  		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
> >  
> >  	return 0;
> > -- 
> > 2.1.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>

-- 
Sent from my Jolla
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-06-19 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-19  6:17 [PATCH] drm/i915: enable BIOS hang workaround for Lenovo T60 too Mikko Rapeli
2015-06-19 15:44 ` Daniel Vetter
2015-06-19 15:44   ` Daniel Vetter
2015-06-19 16:36   ` Paul Bolle
2015-06-19 16:36     ` Paul Bolle
2015-06-22 13:43     ` Imre Deak
2015-06-22 13:43       ` Imre Deak
2015-06-23 10:42       ` Mikko Rapeli
2015-06-23 10:42         ` Mikko Rapeli
2015-06-23 12:23         ` Imre Deak
2015-06-23 12:23           ` Imre Deak
2015-06-19 17:17   ` mikko.rapeli [this message]
2015-06-19 17:17     ` mikko.rapeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=hc9jyi.nq7c1w.1hge0yx-qmf@mail.kapsi.fi \
    --to=mikko.rapeli@iki.fi \
    --cc=daniel.vetter@intel.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.