diff options
author | Kristian Høgsberg <krh@redhat.com> | 2009-03-13 15:42:14 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-03-27 17:45:14 -0400 |
commit | 13520b051e8888dd3af9bda639d83e7df76613d1 (patch) | |
tree | 3af9f049cfe7b2822065ba51426114f85a91fcb4 /drivers/gpu/drm/i915/intel_display.c | |
parent | d490609321828c62e8dfa6220f0acd82e5cb3756 (diff) |
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: Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 8e29545273b6..0d40b4b6979e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1735,13 +1735,21 @@ static void intel_setup_outputs(struct drm_device *dev) | |||
1735 | 1735 | ||
1736 | if (IS_I9XX(dev)) { | 1736 | if (IS_I9XX(dev)) { |
1737 | int found; | 1737 | int found; |
1738 | u32 reg; | ||
1738 | 1739 | ||
1739 | if (I915_READ(SDVOB) & SDVO_DETECTED) { | 1740 | if (I915_READ(SDVOB) & SDVO_DETECTED) { |
1740 | found = intel_sdvo_init(dev, SDVOB); | 1741 | found = intel_sdvo_init(dev, SDVOB); |
1741 | if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) | 1742 | if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) |
1742 | intel_hdmi_init(dev, SDVOB); | 1743 | intel_hdmi_init(dev, SDVOB); |
1743 | } | 1744 | } |
1744 | if (!IS_G4X(dev) || (I915_READ(SDVOB) & SDVO_DETECTED)) { | 1745 | |
1746 | /* Before G4X SDVOC doesn't have its own detect register */ | ||
1747 | if (IS_G4X(dev)) | ||
1748 | reg = SDVOC; | ||
1749 | else | ||
1750 | reg = SDVOB; | ||
1751 | |||
1752 | if (I915_READ(reg) & SDVO_DETECTED) { | ||
1745 | found = intel_sdvo_init(dev, SDVOC); | 1753 | found = intel_sdvo_init(dev, SDVOC); |
1746 | if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) | 1754 | if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) |
1747 | intel_hdmi_init(dev, SDVOC); | 1755 | intel_hdmi_init(dev, SDVOC); |