[Intel-gfx] [PATCH] Use LVDS config in Driver feature BDB for integrated LVDS check

Zhenyu Wang zhenyu.z.wang at intel.com
Wed Feb 18 06:09:41 CET 2009


This might further eliminate LVDS quirks for some non-integrated
LVDS mobile boards. Although I'm not quite sure about if these bits
are the right source of info, vbios dumps on some machines showed
expected results. bios_reader program has been updated to dump
driver feature BDB on master now.

---
 src/i830.h      |    1 +
 src/i830_bios.c |   18 ++++++++++++++++++
 src/i830_lvds.c |    3 +++
 3 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/i830.h b/src/i830.h
index 7904b9f..eb686ae 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -619,6 +619,7 @@ typedef struct _I830Rec {
    Bool lvds_dither;
    DisplayModePtr lvds_fixed_mode;
    Bool skip_panel_detect;
+   Bool integrated_lvds; /* LVDS config from driver feature BDB */
 
    Bool tv_present; /* TV connector present (from VBIOS) */
 
diff --git a/src/i830_bios.c b/src/i830_bios.c
index 6baacd4..28db4f1 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -168,6 +168,23 @@ parse_general_features(I830Ptr pI830, struct bdb_header *bdb)
     }
 }
 
+static void
+parse_driver_feature(I830Ptr pI830, struct bdb_header *bdb)
+{
+    struct bdb_driver_feature *feature;
+
+    if (IS_MOBILE(pI830))
+	pI830->integrated_lvds = TRUE;
+
+    feature = find_section(bdb, BDB_DRIVER_FEATURES);
+    if (!feature)
+	return;
+
+    if (feature->lvds_config == BDB_DRIVER_NO_LVDS ||
+	    feature->lvds_config == BDB_DRIVER_SDVO_LVDS)
+	pI830->integrated_lvds = FALSE;
+}
+
 #define INTEL_VBIOS_SIZE (64 * 1024)	/* XXX */
 
 /**
@@ -246,6 +263,7 @@ i830_bios_init(ScrnInfoPtr pScrn)
 
     parse_general_features(pI830, bdb);
     parse_panel_data(pI830, bdb);
+    parse_driver_feature(pI830, bdb);
 
     xfree(bios);
 
diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 027bb5d..736b8ea 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -1415,6 +1415,9 @@ i830_lvds_init(ScrnInfoPtr pScrn)
     DisplayModePtr	    lvds_ddc_mode = NULL;
     struct i830_lvds_priv   *dev_priv;
 
+    if (!pI830->integrated_lvds)
+	return;
+
     if (pI830->quirk_flag & QUIRK_IGNORE_LVDS)
 	return;
 
-- 
1.5.6.5




More information about the Intel-gfx mailing list