[Intel-gfx] PATCH 2/3]Set crt_present flag according to option in Block #1 of VBT

Ma Ling ling.ma at intel.com
Thu May 7 11:52:09 CEST 2009


set crt_present, if it is false ignore VGA output

Signed-off-by: Ma Ling <ling.ma at intel.com>
---
 src/i830_bios.c |    9 ++++++++-
 src/i830_crt.c  |    3 ++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/i830_bios.c b/src/i830_bios.c
index 7e239aa..d6d8d27 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -189,19 +189,26 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
     parse_sdvo_panel_data(pI830, bdb);
 }
 
+#define SUPPORTED_FEATURES_BYTE 5
 static void
 parse_general_features(I830Ptr pI830, struct bdb_header *bdb)
 {
     struct bdb_general_features *general;
+    uint16_t features_size;
 
     /* Set sensible defaults in case we can't find the general block */
     pI830->tv_present = 1;
+    pI830->crt_present = 1;
 
     general = find_section(bdb, BDB_GENERAL_FEATURES);
     if (!general)
 	return;
 
-    pI830->tv_present = general->int_tv_support;
+    features_size = *((uint16_t *)(((char *)general) - 2));
+    if (features_size >= SUPPORTED_FEATURES_BYTE) {
+        pI830->tv_present = general->int_tv_support;
+        pI830->crt_present = general->int_crt_support;
+    }
     pI830->lvds_use_ssc = general->enable_ssc;
     if (pI830->lvds_use_ssc) {
 	if (IS_I85X(pI830))
diff --git a/src/i830_crt.c b/src/i830_crt.c
index d8e4a76..2bbde01 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -529,7 +529,8 @@ i830_crt_init(ScrnInfoPtr pScrn)
     I830OutputPrivatePtr    i830_output;
     I830Ptr		    pI830 = I830PTR(pScrn);
 
-    if (pI830->quirk_flag & QUIRK_IGNORE_CRT)
+    if ((pI830->quirk_flag & QUIRK_IGNORE_CRT) ||
+        (pI830->crt_present == FALSE))
 	return;
 
     output = xf86OutputCreate (pScrn, &i830_crt_output_funcs, "VGA");
-- 
1.5.4.4






More information about the Intel-gfx mailing list