Commit 13520b05 authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Eric Anholt

drm/i915: Read the right SDVO register when detecting SVDO/HDMI.

This fixes incorrect detection of the second SDVO/HDMI output on G4X, and
extra boot time on pre-G4X.
Signed-off-by: default avatarKristian Høgsberg <krh@redhat.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent d4906093
...@@ -1735,13 +1735,21 @@ static void intel_setup_outputs(struct drm_device *dev) ...@@ -1735,13 +1735,21 @@ static void intel_setup_outputs(struct drm_device *dev)
if (IS_I9XX(dev)) { if (IS_I9XX(dev)) {
int found; int found;
u32 reg;
if (I915_READ(SDVOB) & SDVO_DETECTED) { if (I915_READ(SDVOB) & SDVO_DETECTED) {
found = intel_sdvo_init(dev, SDVOB); found = intel_sdvo_init(dev, SDVOB);
if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
intel_hdmi_init(dev, SDVOB); intel_hdmi_init(dev, SDVOB);
} }
if (!IS_G4X(dev) || (I915_READ(SDVOB) & SDVO_DETECTED)) {
/* Before G4X SDVOC doesn't have its own detect register */
if (IS_G4X(dev))
reg = SDVOC;
else
reg = SDVOB;
if (I915_READ(reg) & SDVO_DETECTED) {
found = intel_sdvo_init(dev, SDVOC); found = intel_sdvo_init(dev, SDVOC);
if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
intel_hdmi_init(dev, SDVOC); intel_hdmi_init(dev, SDVOC);
......
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