]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix crash while aborting hibernation
authorRafael J. Wysocki <rjw@sisk.pl>
Sun, 7 Feb 2010 20:48:24 +0000 (21:48 +0100)
committerEric Anholt <eric@anholt.net>
Thu, 11 Feb 2010 01:34:33 +0000 (17:34 -0800)
commit748a04e8acb7843cfb67f4c71089b3e9f506ed1e
tree087d75e21a0550bc10f109635b93bf02fa220bfb
parent1c94265daff4d845e678bd02cff0ae0f35655860
drm/i915: Fix crash while aborting hibernation

Commit 18df68c88f7b0c4a616ceca404d82b30c50bcf41 (drm/i915: implement
new pm ops for i915) introduced the problem that if s2disk hibernation
is aborted, the system will crash, because i915_pm_freeze() does
nothing, while it should at least reverse some operations carried out
by i915_suspend().

Fix this issue by splitting the i915 suspend into a freeze part a
suspend part, where the latter is not executed before creating a
hibernation image, and the i915 resume into a "low-level" resume part
and a thaw part, where the former is not executed after the image has
been created.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_drv.c