diff options
author | Eric Anholt <eric@anholt.net> | 2008-06-19 14:27:30 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-06-19 15:02:06 -0700 |
commit | 65ad29d78793c7804f133a58de80ffaa0404ca28 (patch) | |
tree | 87fbbb759048fa92a96222304099a32385c3fa20 /src/i830_driver.c | |
parent | ea0d21006ec71bc56acde7291e5f8d28e54b83fe (diff) |
Automatically detect the presence of HDMI.
Now, SDVO is only probed if the SDVO detected bit is set. If the SDVO probe
fails, but the detect bit is set, assume that it's an HDMI output.
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 5782d487..28505c83 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -924,13 +924,19 @@ I830SetupOutputs(ScrnInfoPtr pScrn) i830_lvds_init(pScrn); if (IS_I9XX(pI830)) { -#if 1 - i830_sdvo_init(pScrn, SDVOB); - i830_sdvo_init(pScrn, SDVOC); -#else - i830_hdmi_init(pScrn, SDVOB); - i830_hdmi_init(pScrn, SDVOC); -#endif + if (INREG(SDVOB) & SDVO_DETECTED) { + Bool found = i830_sdvo_init(pScrn, SDVOB); + + if (!found && SUPPORTS_INTEGRATED_HDMI(pI830)) + i830_hdmi_init(pScrn, SDVOB); + } + + if (INREG(SDVOB) & SDVO_DETECTED) { + Bool found = i830_sdvo_init(pScrn, SDVOC); + + if (!found && SUPPORTS_INTEGRATED_HDMI(pI830)) + i830_hdmi_init(pScrn, SDVOC); + } } else { i830_dvo_init(pScrn); } |