i915 / PM: Fix hibernate regression caused by suspend/resume splitting
authorRafael J. Wysocki <rjw@sisk.pl>
Thu, 18 Feb 2010 22:06:27 +0000 (23:06 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 22 Feb 2010 16:47:14 +0000 (08:47 -0800)
commit61caf87cb5c2a198966018343a6ce4c5ab6cf8df
tree4fa1ab6a366627a8d3113b4be62f9c251307a00a
parent4386b58349366511df1c4fe1f7917c198f71529a
i915 / PM: Fix hibernate regression caused by suspend/resume splitting

Commit 84b79f8d2882b0a84330c04839ed4d3cefd2ff77 (drm/i915: Fix crash
while aborting hibernation) attempted to fix a regression introduced
by commit cbda12d77ea590082edb6d30bd342a67ebc459e0 (drm/i915:
implement new pm ops for i915), but it went too far trying to split
the freeze/suspend and resume/thaw parts of the code.  As a result,
it introduced another regression, which only is visible on some systems.

Fix the problem by merging i915_drm_suspend() with
i915_drm_freeze() and moving some code from i915_resume()
into i915_drm_thaw(), so that intel_opregion_free() and
intel_opregion_init() are also executed in the freeze and thaw code
paths, respectively.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Pedro Ribeiro <pedrib@gmail.com>
Tested-by: Tino Keitel <tino.keitel@tikei.de>
Acked-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/i915/i915_drv.c