aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_hdmi.c')
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 7d6bdd705326..4ea2a651b92c 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -56,7 +56,8 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
56 sdvox = SDVO_ENCODING_HDMI | 56 sdvox = SDVO_ENCODING_HDMI |
57 SDVO_BORDER_ENABLE | 57 SDVO_BORDER_ENABLE |
58 SDVO_VSYNC_ACTIVE_HIGH | 58 SDVO_VSYNC_ACTIVE_HIGH |
59 SDVO_HSYNC_ACTIVE_HIGH; 59 SDVO_HSYNC_ACTIVE_HIGH |
60 SDVO_NULL_PACKETS_DURING_VSYNC;
60 61
61 if (hdmi_priv->has_hdmi_sink) 62 if (hdmi_priv->has_hdmi_sink)
62 sdvox |= SDVO_AUDIO_ENABLE; 63 sdvox |= SDVO_AUDIO_ENABLE;
@@ -145,6 +146,22 @@ intel_hdmi_sink_detect(struct drm_connector *connector)
145} 146}
146 147
147static enum drm_connector_status 148static enum drm_connector_status
149igdng_hdmi_detect(struct drm_connector *connector)
150{
151 struct intel_output *intel_output = to_intel_output(connector);
152 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
153
154 /* FIXME hotplug detect */
155
156 hdmi_priv->has_hdmi_sink = false;
157 intel_hdmi_sink_detect(connector);
158 if (hdmi_priv->has_hdmi_sink)
159 return connector_status_connected;
160 else
161 return connector_status_disconnected;
162}
163
164static enum drm_connector_status
148intel_hdmi_detect(struct drm_connector *connector) 165intel_hdmi_detect(struct drm_connector *connector)
149{ 166{
150 struct drm_device *dev = connector->dev; 167 struct drm_device *dev = connector->dev;
@@ -153,6 +170,9 @@ intel_hdmi_detect(struct drm_connector *connector)
153 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv; 170 struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
154 u32 temp, bit; 171 u32 temp, bit;
155 172
173 if (IS_IGDNG(dev))
174 return igdng_hdmi_detect(connector);
175
156 temp = I915_READ(PORT_HOTPLUG_EN); 176 temp = I915_READ(PORT_HOTPLUG_EN);
157 177
158 switch (hdmi_priv->sdvox_reg) { 178 switch (hdmi_priv->sdvox_reg) {
@@ -269,8 +289,17 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
269 /* Set up the DDC bus. */ 289 /* Set up the DDC bus. */
270 if (sdvox_reg == SDVOB) 290 if (sdvox_reg == SDVOB)
271 intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "HDMIB"); 291 intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "HDMIB");
272 else 292 else if (sdvox_reg == SDVOC)
273 intel_output->ddc_bus = intel_i2c_create(dev, GPIOD, "HDMIC"); 293 intel_output->ddc_bus = intel_i2c_create(dev, GPIOD, "HDMIC");
294 else if (sdvox_reg == HDMIB)
295 intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOE,
296 "HDMIB");
297 else if (sdvox_reg == HDMIC)
298 intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOD,
299 "HDMIC");
300 else if (sdvox_reg == HDMID)
301 intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOF,
302 "HDMID");
274 303
275 if (!intel_output->ddc_bus) 304 if (!intel_output->ddc_bus)
276 goto err_connector; 305 goto err_connector;