From: Eric Anholt Date: Thu, 22 Jan 2009 21:01:02 +0000 (-0800) Subject: drm/i915: Skip SDVO/HDMI init when the chipset tells us it's not present. X-Git-Tag: v2.6.29-rc5~50^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=725e30ad6601d7fe443d9215d6331758a9d7e0c8;p=karo-tx-linux.git drm/i915: Skip SDVO/HDMI init when the chipset tells us it's not present. This saves startup time from probing SDVO, and saves setting up HDMI outputs on G4X devices that don't have them. Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 31c3732b7a69..dce1abfa6496 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1452,6 +1452,7 @@ static int intel_connector_clones(struct drm_device *dev, int type_mask) static void intel_setup_outputs(struct drm_device *dev) { + struct drm_i915_private *dev_priv = dev->dev_private; struct drm_connector *connector; intel_crt_init(dev); @@ -1463,13 +1464,16 @@ static void intel_setup_outputs(struct drm_device *dev) if (IS_I9XX(dev)) { int found; - found = intel_sdvo_init(dev, SDVOB); - if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) - intel_hdmi_init(dev, SDVOB); - - found = intel_sdvo_init(dev, SDVOC); - if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) - intel_hdmi_init(dev, SDVOC); + if (I915_READ(SDVOB) & SDVO_DETECTED) { + found = intel_sdvo_init(dev, SDVOB); + if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) + intel_hdmi_init(dev, SDVOB); + } + if (!IS_G4X(dev) || (I915_READ(SDVOB) & SDVO_DETECTED)) { + found = intel_sdvo_init(dev, SDVOC); + if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) + intel_hdmi_init(dev, SDVOC); + } } else intel_dvo_init(dev);