intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/6] drm/i915: emit a hotplug event on resume
Date: Fri, 15 Feb 2013 13:23:13 -0800	[thread overview]
Message-ID: <1360963394-8663-6-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1360963394-8663-1-git-send-email-jbarnes@virtuousgeek.org>

This will poke userspace into probing for configuration changes that may
have occurred across suspend/resume.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_drv.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index e76b038..1b37eec 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -551,6 +551,24 @@ void intel_console_resume(struct work_struct *work)
 	console_unlock();
 }
 
+static void intel_resume_hotplug(struct drm_device *dev)
+{
+	struct drm_mode_config *mode_config = &dev->mode_config;
+	struct intel_encoder *encoder;
+
+	mutex_lock(&mode_config->mutex);
+	DRM_DEBUG_KMS("running encoder hotplug functions\n");
+
+	list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
+		if (encoder->hot_plug)
+			encoder->hot_plug(encoder);
+
+	mutex_unlock(&mode_config->mutex);
+
+	/* Just fire off a uevent and let userspace tell us what to do */
+	drm_helper_hpd_irq_event(dev);
+}
+
 static int __i915_drm_thaw(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
@@ -578,6 +596,8 @@ static int __i915_drm_thaw(struct drm_device *dev)
 		drm_modeset_lock_all(dev);
 		intel_modeset_setup_hw_state(dev, true);
 		drm_modeset_unlock_all(dev);
+
+		intel_resume_hotplug(dev);
 	}
 
 	intel_opregion_init(dev);
-- 
1.7.9.5

  parent reply	other threads:[~2013-02-15 21:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 21:23 VT switchless v3 Jesse Barnes
2013-02-15 21:23 ` [PATCH 1/6] drm/i915: don't restore LVDS enable state blindly v2 Jesse Barnes
2013-02-15 21:23 ` [PATCH 2/6] drm/i915: add sprite restore function v2 Jesse Barnes
2013-02-18 17:19   ` Ville Syrjälä
2013-02-19 18:16     ` Jesse Barnes
2013-02-15 21:23 ` [PATCH 3/6] drm/i915: restore cursor and sprite state when forcing a config restore Jesse Barnes
2013-02-15 21:23 ` [PATCH 4/6] drm/i915: enable VT switchless resume v2 Jesse Barnes
2013-02-15 21:23 ` Jesse Barnes [this message]
2013-02-15 21:23 ` [PATCH 6/6] drm/i915: remove disabled memset of framebuffer from intel_fb Jesse Barnes
2013-02-18 15:03 ` VT switchless v3 Daniel Vetter
2013-02-19  0:58   ` Kristian Høgsberg
2013-02-19 18:15     ` Jesse Barnes
2013-02-19 18:13   ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2013-02-19 20:11 VT switchless suspend/resume Jesse Barnes
2013-02-19 20:11 ` [PATCH 5/6] drm/i915: emit a hotplug event on resume Jesse Barnes
2013-02-15 21:07 VT switchless resume v2 Jesse Barnes
2013-02-15 21:07 ` [PATCH 5/6] drm/i915: emit a hotplug event on resume Jesse Barnes
2013-02-15 20:42 VT switchless resume patches Jesse Barnes
2013-02-15 20:42 ` [PATCH 5/6] drm/i915: emit a hotplug event on resume Jesse Barnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360963394-8663-6-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).