diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2013-03-26 12:25:46 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-26 16:38:41 -0400 |
commit | bb60b9695ced58768ba05b2d88fb4ee815df18f4 (patch) | |
tree | 260b4327c7ef3b39dd2f0f5d6d091182016dfc91 /drivers/gpu/drm/i915/i915_drv.c | |
parent | 24576d23976746cb52e7700c4cadbf4bc1bc3472 (diff) |
drm/i915: emit a hotplug event on resume
This will poke userspace into probing for configuration changes that may
have occurred across suspend/resume.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index bf57e1cc88b1..0cfc778aa759 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -545,6 +545,24 @@ void intel_console_resume(struct work_struct *work) | |||
545 | console_unlock(); | 545 | console_unlock(); |
546 | } | 546 | } |
547 | 547 | ||
548 | static void intel_resume_hotplug(struct drm_device *dev) | ||
549 | { | ||
550 | struct drm_mode_config *mode_config = &dev->mode_config; | ||
551 | struct intel_encoder *encoder; | ||
552 | |||
553 | mutex_lock(&mode_config->mutex); | ||
554 | DRM_DEBUG_KMS("running encoder hotplug functions\n"); | ||
555 | |||
556 | list_for_each_entry(encoder, &mode_config->encoder_list, base.head) | ||
557 | if (encoder->hot_plug) | ||
558 | encoder->hot_plug(encoder); | ||
559 | |||
560 | mutex_unlock(&mode_config->mutex); | ||
561 | |||
562 | /* Just fire off a uevent and let userspace tell us what to do */ | ||
563 | drm_helper_hpd_irq_event(dev); | ||
564 | } | ||
565 | |||
548 | static int __i915_drm_thaw(struct drm_device *dev) | 566 | static int __i915_drm_thaw(struct drm_device *dev) |
549 | { | 567 | { |
550 | struct drm_i915_private *dev_priv = dev->dev_private; | 568 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -580,6 +598,8 @@ static int __i915_drm_thaw(struct drm_device *dev) | |||
580 | * */ | 598 | * */ |
581 | intel_hpd_init(dev); | 599 | intel_hpd_init(dev); |
582 | dev_priv->enable_hotplug_processing = true; | 600 | dev_priv->enable_hotplug_processing = true; |
601 | /* Config may have changed between suspend and resume */ | ||
602 | intel_resume_hotplug(dev); | ||
583 | } | 603 | } |
584 | 604 | ||
585 | intel_opregion_init(dev); | 605 | intel_opregion_init(dev); |