Skip to content

Commit

Permalink
drm/i915: Read the right SDVO register when detecting SVDO/HDMI.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kristian Høgsberg authored and Eric Anholt committed Mar 27, 2009
1 parent d490609 commit 13520b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1735,13 +1735,21 @@ static void intel_setup_outputs(struct drm_device *dev)

if (IS_I9XX(dev)) {
int found;
u32 reg;

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)) {

/* 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);
if (!found && SUPPORTS_INTEGRATED_HDMI(dev))
intel_hdmi_init(dev, SDVOC);
Expand Down

0 comments on commit 13520b0

Please sign in to comment.