drm/i915: don't block resume on fb console resume v2
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 2 Nov 2012 18:13:59 +0000 (11:13 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 11 Nov 2012 22:51:40 +0000 (23:51 +0100)
commit073f34d9d49bdbadbea8198ddc3fbb7e736a94dd
tree6239b1055003f01aa92624fa4873f45376be5cf2
parenta4da4fa4e55a8cea7fe603e7564e72db97b77a89
drm/i915: don't block resume on fb console resume v2

The console lock can be contended, so rather than prevent other drivers
after us from being held up, queue the console suspend into the global
work queue that can happen anytime.  I've measured this to take around
200ms on my T420.  Combined with the ring freq/turbo change, we should
save almost 1/2 a second on resume.

v2: use console_trylock() to try to resume the console immediately (Chris)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[danvet: move dev_priv->console_resume_work next to the fbdev
pointer.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h