[Intel-gfx] [PATCH] Use enable bit for LVDS detect

Zhenyu Wang zhenyu.z.wang at intel.com
Fri Nov 21 03:36:21 CET 2008


This looks like a promising right way to check if LVDS
is available or not. Because if LVDS is enabled on the board,
it will be used as primary display, so video bios should already
have initialized it.

Michael asked me for this, from several ModeDebug logs and my
test on aopen showed this method working. 

---
 src/i830_driver.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 1407a22..2eeeb84 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -908,7 +908,8 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
    i830_crt_init(pScrn);
 
    /* Set up integrated LVDS */
-   if (IS_MOBILE(pI830) && !IS_I830(pI830))
+   if (IS_MOBILE(pI830) && !IS_I830(pI830) &&
+	   (INREG(LVDS) & LVDS_PORT_EN))
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
-- 
1.5.6.5




More information about the Intel-gfx mailing list