<div dir="ltr">Reviewed-by: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@gmail.com">rodrigo.vivi@gmail.com</a>><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 26, 2013 at 1:25 PM, Jesse Barnes <span dir="ltr"><<a href="mailto:jbarnes@virtuousgeek.org" target="_blank">jbarnes@virtuousgeek.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This will poke userspace into probing for configuration changes that may<br>
have occurred across suspend/resume.<br>
<br>
Signed-off-by: Jesse Barnes <<a href="mailto:jbarnes@virtuousgeek.org">jbarnes@virtuousgeek.org</a>><br>
---<br>
drivers/gpu/drm/i915/i915_drv.c | 20 ++++++++++++++++++++<br>
1 file changed, 20 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c<br>
index bf57e1c..0cfc778 100644<br>
--- a/drivers/gpu/drm/i915/i915_drv.c<br>
+++ b/drivers/gpu/drm/i915/i915_drv.c<br>
@@ -545,6 +545,24 @@ void intel_console_resume(struct work_struct *work)<br>
console_unlock();<br>
}<br>
<br>
+static void intel_resume_hotplug(struct drm_device *dev)<br>
+{<br>
+ struct drm_mode_config *mode_config = &dev->mode_config;<br>
+ struct intel_encoder *encoder;<br>
+<br>
+ mutex_lock(&mode_config->mutex);<br>
+ DRM_DEBUG_KMS("running encoder hotplug functions\n");<br>
+<br>
+ list_for_each_entry(encoder, &mode_config->encoder_list, base.head)<br>
+ if (encoder->hot_plug)<br>
+ encoder->hot_plug(encoder);<br>
+<br>
+ mutex_unlock(&mode_config->mutex);<br>
+<br>
+ /* Just fire off a uevent and let userspace tell us what to do */<br>
+ drm_helper_hpd_irq_event(dev);<br>
+}<br>
+<br>
static int __i915_drm_thaw(struct drm_device *dev)<br>
{<br>
struct drm_i915_private *dev_priv = dev->dev_private;<br>
@@ -580,6 +598,8 @@ static int __i915_drm_thaw(struct drm_device *dev)<br>
* */<br>
intel_hpd_init(dev);<br>
dev_priv->enable_hotplug_processing = true;<br>
+ /* Config may have changed between suspend and resume */<br>
+ intel_resume_hotplug(dev);<br>
}<br>
<br>
intel_opregion_init(dev);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Rodrigo Vivi</div><div>Blog: <a href="http://blog.vivi.eng.br" target="_blank">http://blog.vivi.eng.br</a></div><div> </div>
</div>