diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-11-02 14:13:59 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-11 17:51:40 -0500 |
commit | 073f34d9d49bdbadbea8198ddc3fbb7e736a94dd (patch) | |
tree | 6239b1055003f01aa92624fa4873f45376be5cf2 /drivers/gpu/drm/i915/i915_drv.h | |
parent | a4da4fa4e55a8cea7fe603e7564e72db97b77a89 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 135b9db55279..f8fa63deb92c 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -887,6 +887,12 @@ typedef struct drm_i915_private { | |||
887 | /* list of fbdev register on this device */ | 887 | /* list of fbdev register on this device */ |
888 | struct intel_fbdev *fbdev; | 888 | struct intel_fbdev *fbdev; |
889 | 889 | ||
890 | /* | ||
891 | * The console may be contended at resume, but we don't | ||
892 | * want it to block on it. | ||
893 | */ | ||
894 | struct work_struct console_resume_work; | ||
895 | |||
890 | struct backlight_device *backlight; | 896 | struct backlight_device *backlight; |
891 | 897 | ||
892 | struct drm_property *broadcast_rgb_property; | 898 | struct drm_property *broadcast_rgb_property; |
@@ -1273,6 +1279,7 @@ extern unsigned long i915_mch_val(struct drm_i915_private *dev_priv); | |||
1273 | extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv); | 1279 | extern unsigned long i915_gfx_val(struct drm_i915_private *dev_priv); |
1274 | extern void i915_update_gfx_val(struct drm_i915_private *dev_priv); | 1280 | extern void i915_update_gfx_val(struct drm_i915_private *dev_priv); |
1275 | 1281 | ||
1282 | extern void intel_console_resume(struct work_struct *work); | ||
1276 | 1283 | ||
1277 | /* i915_irq.c */ | 1284 | /* i915_irq.c */ |
1278 | void i915_hangcheck_elapsed(unsigned long data); | 1285 | void i915_hangcheck_elapsed(unsigned long data); |