Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148692
b: refs/heads/master
c: 30ad48b
h: refs/heads/master
v: v3
  • Loading branch information
Zhenyu Wang authored and Eric Anholt committed Jun 5, 2009
1 parent c8ca216 commit d1c989e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c07245fb8f7f0a282282e5a9747e46defdb2cc7
refs/heads/master: 30ad48b7334a2eb2edf22f6c91f7b3f22a22a837
17 changes: 16 additions & 1 deletion trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,22 @@ static void intel_setup_outputs(struct drm_device *dev)
intel_lvds_init(dev);

if (IS_IGDNG(dev)) {
/* ignore for other outputs */
int found;

if (I915_READ(HDMIB) & PORT_DETECTED) {
/* check SDVOB */
/* found = intel_sdvo_init(dev, HDMIB); */
found = 0;
if (!found)
intel_hdmi_init(dev, HDMIB);
}

if (I915_READ(HDMIC) & PORT_DETECTED)
intel_hdmi_init(dev, HDMIC);

if (I915_READ(HDMID) & PORT_DETECTED)
intel_hdmi_init(dev, HDMID);

} else if (IS_I9XX(dev)) {
int found;
u32 reg;
Expand Down
33 changes: 31 additions & 2 deletions trunk/drivers/gpu/drm/i915/intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ static void intel_hdmi_mode_set(struct drm_encoder *encoder,
sdvox = SDVO_ENCODING_HDMI |
SDVO_BORDER_ENABLE |
SDVO_VSYNC_ACTIVE_HIGH |
SDVO_HSYNC_ACTIVE_HIGH;
SDVO_HSYNC_ACTIVE_HIGH |
SDVO_NULL_PACKETS_DURING_VSYNC;

if (hdmi_priv->has_hdmi_sink)
sdvox |= SDVO_AUDIO_ENABLE;
Expand Down Expand Up @@ -144,6 +145,22 @@ intel_hdmi_sink_detect(struct drm_connector *connector)
}
}

static enum drm_connector_status
igdng_hdmi_detect(struct drm_connector *connector)
{
struct intel_output *intel_output = to_intel_output(connector);
struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;

/* FIXME hotplug detect */

hdmi_priv->has_hdmi_sink = false;
intel_hdmi_sink_detect(connector);
if (hdmi_priv->has_hdmi_sink)
return connector_status_connected;
else
return connector_status_disconnected;
}

static enum drm_connector_status
intel_hdmi_detect(struct drm_connector *connector)
{
Expand All @@ -153,6 +170,9 @@ intel_hdmi_detect(struct drm_connector *connector)
struct intel_hdmi_priv *hdmi_priv = intel_output->dev_priv;
u32 temp, bit;

if (IS_IGDNG(dev))
return igdng_hdmi_detect(connector);

temp = I915_READ(PORT_HOTPLUG_EN);

switch (hdmi_priv->sdvox_reg) {
Expand Down Expand Up @@ -268,8 +288,17 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
/* Set up the DDC bus. */
if (sdvox_reg == SDVOB)
intel_output->ddc_bus = intel_i2c_create(dev, GPIOE, "HDMIB");
else
else if (sdvox_reg == SDVOC)
intel_output->ddc_bus = intel_i2c_create(dev, GPIOD, "HDMIC");
else if (sdvox_reg == HDMIB)
intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOE,
"HDMIB");
else if (sdvox_reg == HDMIC)
intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOD,
"HDMIC");
else if (sdvox_reg == HDMID)
intel_output->ddc_bus = intel_i2c_create(dev, PCH_GPIOF,
"HDMID");

if (!intel_output->ddc_bus)
goto err_connector;
Expand Down

0 comments on commit d1c989e

Please sign in to comment.