All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Mikko Rapeli <mikko.rapeli@iki.fi>, Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Ilya Tumaykin" <itumaykin@gmail.com>,
	"Dirk Griesbach" <spamthis@freenet.de>,
	"Pavel Machek" <pavel@ucw.cz>, "Paul Bolle" <pebolle@tiscali.nl>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6
Date: Mon, 31 Aug 2015 18:45:32 +0300	[thread overview]
Message-ID: <87fv2zxy03.fsf@intel.com> (raw)
In-Reply-To: <20150829180211.GV9187@lakka.kapsi.fi>

On Sat, 29 Aug 2015, Mikko Rapeli <mikko.rapeli@iki.fi> wrote:
> Please, please merge this patch already. Without it hibernation poweroff
> is broken for several users. There were some doubts raised over the
> approach on lkml review but Imre as maintainer thinks this is the right
> thing to do and users like me need this patch.
>
> Tested again with Thinkpad T60 and kernel version 4.1.6.
>
> Tested-by: Mikko Rapeli <mikko.rapeli@iki.fi>

Pushed to drm-intel-next-fixes.

BR,
Jani.

>
> -Mikko
>
> On Tue, Jun 30, 2015 at 05:06:47PM +0300, Imre Deak wrote:
>> commit da2bc1b9db3351addd293e5b82757efe1f77ed1d
>> Author: Imre Deak <imre.deak@intel.com>
>> Date:   Thu Oct 23 19:23:26 2014 +0300
>> 
>>     drm/i915: add poweroff_late handler
>> 
>> introduced a regression on old platforms during hibernation. A workaround was
>> added in
>> 
>> commit ab3be73fa7b43f4c3648ce29b5fd649ea54d3adb
>> Author: Imre Deak <imre.deak@intel.com>
>> Date:   Mon Mar 2 13:04:41 2015 +0200
>> 
>>     drm/i915: gen4: work around hang during hibernation
>> 
>> using an explicit blacklist for the GENs/BIOS vendors where the issue was
>> reported. Later there we had reports of the same failure on platforms not on
>> this list.
>> 
>> To my best knowledge the correct thing to do is still to put the device to PCI
>> D3 state during hibernation, see [1] and [2] for the reasons. This also aligns
>> with our future plans to unify more the runtime and system suspend/resume
>> paths. Since an exact blacklist seems to be impractical (multiple GENs and
>> BIOS vendors are affected) apply the workaround on everything pre GEN6.
>> 
>> [1] http://lists.freedesktop.org/archives/intel-gfx/2015-February/060710.html
>> [2] https://lkml.org/lkml/2015/6/22/274
>> 
>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=95061
>> Reported-by: Ilya Tumaykin <itumaykin@gmail.com>
>> Reported-by: Dirk Griesbach <spamthis@freenet.de>
>> Reported-by: Pavel Machek <pavel@ucw.cz>
>> Reported-by: Mikko Rapeli <mikko.rapeli@iki.fi>
>> Reported-by: Paul Bolle <pebolle@tiscali.nl>
>> CC: stable@vger.kernel.org
>> Signed-off-by: Imre Deak <imre.deak@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_drv.c | 15 +++++++++------
>>  1 file changed, 9 insertions(+), 6 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
>> index e44dc0d..1e675ff 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.c
>> +++ b/drivers/gpu/drm/i915/i915_drv.c
>> @@ -664,15 +664,18 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
>>  
>>  	pci_disable_device(drm_dev->pdev);
>>  	/*
>> -	 * During hibernation on some GEN4 platforms the BIOS may try to access
>> +	 * During hibernation on some platforms the BIOS may try to access
>>  	 * 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
>> +	 * power down the device properly. The issue was seen on multiple old
>> +	 * GENs with different BIOS vendors, so having an explicit blacklist
>> +	 * is inpractical; apply the workaround on everything pre GEN6. The
>> +	 * platforms where the issue was seen:
>> +	 * Lenovo Thinkpad X301, X61s, X60, T60, X41
>> +	 * Fujitsu FSC S7110
>> +	 * Acer Aspire 1830T
>>  	 */
>> -	if (!(hibernation &&
>> -	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
>> -	      INTEL_INFO(dev_priv)->gen == 4))
>> +	if (!(hibernation && INTEL_INFO(dev_priv)->gen < 6))
>>  		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
>>  
>>  	return 0;
>> -- 
>> 2.1.4
>> 

-- 
Jani Nikula, Intel Open Source Technology Center

      reply	other threads:[~2015-08-31 15:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30 14:06 [PATCH] drm/i915: apply the PCI_D0/D3 hibernation workaround everywhere on pre GEN6 Imre Deak
2015-06-30 14:06 ` Imre Deak
2015-06-30 17:27 ` Pavel Machek
2015-06-30 17:27   ` Pavel Machek
2015-07-01  8:35   ` Jani Nikula
2015-07-01  8:35     ` Jani Nikula
2015-07-01  8:45     ` Pavel Machek
2015-07-01  8:45       ` Pavel Machek
2015-07-01  9:02   ` Ville Syrjälä
2015-07-01  9:02     ` Ville Syrjälä
2015-07-01  9:51     ` Pavel Machek
2015-07-01 10:53       ` Ville Syrjälä
2015-07-01 10:53         ` Ville Syrjälä
2015-07-01 12:35         ` Pavel Machek
2015-07-01 12:35           ` Pavel Machek
2015-07-01 12:42           ` Jani Nikula
2015-07-01 12:57           ` David Weinehall
2015-07-01 12:57             ` [Intel-gfx] " David Weinehall
2015-07-02  4:50 ` shuang.he
2015-07-15  6:22 ` Mikko Rapeli
2015-07-15  6:22   ` Mikko Rapeli
2015-08-29 18:02 ` Mikko Rapeli
2015-08-31 15:45   ` Jani Nikula [this message]

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=87fv2zxy03.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=itumaykin@gmail.com \
    --cc=mikko.rapeli@iki.fi \
    --cc=pavel@ucw.cz \
    --cc=pebolle@tiscali.nl \
    --cc=rjw@rjwysocki.net \
    --cc=spamthis@freenet.de \
    --cc=stable@vger.kernel.org \
    --cc=ville.syrjala@linux.intel.com \
    /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.