Commit 5d250b05 authored by Sonika Jindal's avatar Sonika Jindal Committed by Daniel Vetter

drm/i915: Call encoder hotplug for init and resume cases

For all the encoders, call the hot_plug if it is registered.
This is required for connected boot and resume cases to generate
fake hpd resulting in reading of edid.
Removing the initial sdvo hot_plug call too so that it will be called
just once from this loop.
Signed-off-by: default avatarSonika Jindal <sonika.jindal@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 06812760
...@@ -458,6 +458,7 @@ void intel_hpd_init(struct drm_i915_private *dev_priv) ...@@ -458,6 +458,7 @@ void intel_hpd_init(struct drm_i915_private *dev_priv)
{ {
struct drm_device *dev = dev_priv->dev; struct drm_device *dev = dev_priv->dev;
struct drm_mode_config *mode_config = &dev->mode_config; struct drm_mode_config *mode_config = &dev->mode_config;
struct intel_encoder *encoder;
struct drm_connector *connector; struct drm_connector *connector;
int i; int i;
...@@ -482,6 +483,16 @@ void intel_hpd_init(struct drm_i915_private *dev_priv) ...@@ -482,6 +483,16 @@ void intel_hpd_init(struct drm_i915_private *dev_priv)
if (dev_priv->display.hpd_irq_setup) if (dev_priv->display.hpd_irq_setup)
dev_priv->display.hpd_irq_setup(dev); dev_priv->display.hpd_irq_setup(dev);
spin_unlock_irq(&dev_priv->irq_lock); spin_unlock_irq(&dev_priv->irq_lock);
/*
* Connected boot / resume scenarios can't generate new hot plug.
* So, probe it manually.
*/
list_for_each_entry(encoder, &dev->mode_config.encoder_list,
base.head) {
if (encoder->hot_plug)
encoder->hot_plug(encoder);
}
} }
void intel_hpd_init_work(struct drm_i915_private *dev_priv) void intel_hpd_init_work(struct drm_i915_private *dev_priv)
......
...@@ -2460,7 +2460,6 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device) ...@@ -2460,7 +2460,6 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
* Ensure that they get re-enabled when an interrupt happens. * Ensure that they get re-enabled when an interrupt happens.
*/ */
intel_encoder->hot_plug = intel_sdvo_enable_hotplug; intel_encoder->hot_plug = intel_sdvo_enable_hotplug;
intel_sdvo_enable_hotplug(intel_encoder);
} else { } else {
intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment