]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: fix suspend/resume breakage in lid notifier
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 14 Sep 2009 17:58:48 +0000 (10:58 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 17 Sep 2009 21:42:54 +0000 (14:42 -0700)
commitec8529be8cde0e6f205e0f470e2a9908a452f1c6
tree252e7a4a096249c1b3db037c27631290bcfa7e8f
parent3448e6eff913f51755e6077b83f111f0ebf649d6
drm/i915: fix suspend/resume breakage in lid notifier

We now unconditionally restore the mode at lid open time since some
platforms turn off the panel, pipes or other display elements when the
lid is closed.  There's a problem with doing this at resume time
however.

At resume time, we'll get a lid event, but restoring the mode at that
time may not be safe (e.g. if we get the lid event before global state
has been restored), so check the suspended state and make sure our
restore is locked against other mode updates.

Tested-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_lvds.c