mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>,
	Eric Anholt <eric@anholt.net>,
	linux-pm@lists.linux-foundation.org,
	dri-devel@lists.sourceforge.net,
	Kernel Testers List <kernel-testers@vger.kernel.org>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i915 / PM: Fix crash while aborting hibernation (Re: [linux-pm] [regression] "drm/i915: implement new pm ops" disables irq on aborted s2disk)
Date: Mon, 08 Feb 2010 09:49:08 +0000	[thread overview]
Message-ID: <4B6FDE14.8070406@tuffmail.co.uk> (raw)
In-Reply-To: <201002072148.24588.rjw@sisk.pl>

Rafael J. Wysocki wrote:
> On Thursday 04 February 2010, Zhenyu Wang wrote:
>   
>> On 2010.02.03 23:44:41 +0100, Rafael J. Wysocki wrote:
>>     
>>> On Wednesday 03 February 2010, Alan Jenkins wrote:
>>>       
>>>> Hi
>>>>
>>>> I found this regression on my EeePC 701 with modesetting enabled.  When 
>>>> I hibernate using s2disk, I can abort the hibernation by pressing the 
>>>> backspace key.  Doing so breaks X on 2.6.32-rc6 (but not 2.6.32).
>>>>         
>>> Yeah.
>>>
>>> To be honest, I knew that's going to happen, but didn't have the time to take
>>> care of it.
>>>
>>> The problem is that i915 does literally _nothing_ in its .thaw() callback,
>>> although it should at least reverse whatever .freeze() did to the hardware
>>> (and memory allocations and so on), so that the adapter is functional
>>> after creating the image.
>>>
>>> Fixing this requires some thought, though, because at the moment .freeze()
>>> thinks it's .suspend(), which is not the case as this report clearly shows.
>>> So, in fact i915_pci_suspend() has to be split into the .freeze() part and
>>> the poweroff part cleanly and that's not  so simple (at least to me).
>>>
>>>       
>> Right, I think that'll be more clean, stuff in i915_save/restore_state() need
>> to be splited too, especially isolate stuff for mode setting and other device
>> state, as what my original purpose for this is to remove extra mode setting 
>> cycle in old behavior so not waste time for hibernate.
>>     
>
> We can't really do that, because we'll need to restore the saved state at the
> resume-from-hibernation stage.
>
> The appended patch fixes the issue for me, although it's been only tested
> a little.  It sort of defeats the purpose of commit
> cbda12d77ea590082edb6d30bd342a67ebc459e0, but I don't see any less invasive
> way to fix this except maybe for reverting that commit entirely.
>
> Note that the drm_irq_[un]install() thing may be unnecessary, but I wasn't sure
> about that and surely wouldn't suggest doing that for 2.6.33.  Also it looks like
> some things from the freeze and thaw parts may be moved to the "low-level"
> suspend and resume parts, respectively, but that would require some
> i915_gem_* surgery I was too scared to do.
>
> Alan, please test, i915 guys, please review.
>
> Rafael
>   

The patch works very nicely on my eeepc.

Thanks
(and thanks again for all your hard work this cycle, and specifically 
for pointing me to the s2disk hang-fix)

Alan

  reply	other threads:[~2010-02-08  9:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4B695BA0.4000007@tuffmail.co.uk>
     [not found] ` <201002032344.41915.rjw@sisk.pl>
     [not found]   ` <20100204013157.GA30011@zhen-devel.sh.intel.com>
2010-02-07 20:48     ` Rafael J. Wysocki
2010-02-08  9:49       ` Alan Jenkins [this message]
2010-02-08 11:06         ` Rafael J. Wysocki
2010-02-11  0:59       ` Eric Anholt

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=4B6FDE14.8070406@tuffmail.co.uk \
    --to=alan-jenkins@tuffmail.co.uk \
    --cc=dri-devel@lists.sourceforge.net \
    --cc=eric@anholt.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=kernel-testers@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=rjw@sisk.pl \
    --cc=zhenyuw@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome