xf86-video-intel: 2 commits - src/bios_reader/bios_reader.c src/i830_bios.c src/i830_bios.h src/i830.h src/i830_lvds.c

Zhenyu Wang zhen at kemper.freedesktop.org
Tue Feb 24 18:09:12 PST 2009


 src/bios_reader/bios_reader.c |    6 +++---
 src/i830.h                    |    1 +
 src/i830_bios.c               |   18 ++++++++++++++++++
 src/i830_bios.h               |    4 ++--
 src/i830_lvds.c               |    7 +++++++
 5 files changed, 31 insertions(+), 5 deletions(-)

New commits:
commit f6d8ae69b0f97e696c142f06c8038f336ed024f9
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 25 09:57:00 2009 +0800

    Use LVDS config in Driver feature BDB for integrated LVDS check
    
    The LVDS config bits in VBT driver feature block is used by vendor
    to identify the board implement of integrated LVDS/eDP or SDVO LVDS.
    And video bios uses these bits for LVDS enabling or not. So check
    these bits for integrated LVDS might eliminate more quirks.

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..a990ebe 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;
+
+    /* For mobile chip, set default as true */
+    if (IS_MOBILE(pI830))
+	pI830->integrated_lvds = TRUE;
+
+    feature = find_section(bdb, BDB_DRIVER_FEATURES);
+    if (!feature)
+	return;
+
+    if (feature->lvds_config != BDB_DRIVER_INT_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..63533cd 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -1415,6 +1415,13 @@ i830_lvds_init(ScrnInfoPtr pScrn)
     DisplayModePtr	    lvds_ddc_mode = NULL;
     struct i830_lvds_priv   *dev_priv;
 
+    if (!pI830->integrated_lvds) {
+	if (pI830->debug_modes)
+	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+		   "Skipping LVDS from driver feature BDB's LVDS config info.\n");
+	return;
+    }
+
     if (pI830->quirk_flag & QUIRK_IGNORE_LVDS)
 	return;
 
commit 8718551f14e064b461e80a583597f0ea9fb8ca9f
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 25 09:54:03 2009 +0800

    Update LVDS config bits definition in driver feature block
    
    ALL_LVDS is actually not defined before and include GM45.
    Embedded DP bit will be used for newer chips.

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index db8f364..2b98e1f 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -404,14 +404,14 @@ static void dump_driver_feature(void)
 	case BDB_DRIVER_NO_LVDS:
 	    printf("No LVDS\n");
 	    break;
-	case BDB_DRIVER_INTER_LVDS:
+	case BDB_DRIVER_INT_LVDS:
 	    printf("Integrated LVDS\n");
 	    break;
 	case BDB_DRIVER_SDVO_LVDS:
 	    printf("SDVO LVDS\n");
 	    break;
-	case BDB_DRIVER_ALL_LVDS:
-	    printf("Both Integrated LVDS and SDVO LVDS\n");
+	case BDB_DRIVER_EDP:
+	    printf("Embedded DisplayPort\n");
 	    break;
     }
     free(block);
diff --git a/src/i830_bios.h b/src/i830_bios.h
index 2dcc092..ec8bd8f 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -396,9 +396,9 @@ struct vch_bdb_22 {
 } __attribute__((packed));
 
 #define BDB_DRIVER_NO_LVDS	0
-#define BDB_DRIVER_INTER_LVDS	1
+#define BDB_DRIVER_INT_LVDS	1
 #define BDB_DRIVER_SDVO_LVDS	2
-#define BDB_DRIVER_ALL_LVDS	3
+#define BDB_DRIVER_EDP		3
 
 struct bdb_driver_feature {
     uint8_t	boot_dev_algorithm:1;


More information about the xorg-commit mailing list