xf86-video-intel: src/bios_reader/bios_reader.c src/i830_bios.h

Zhenyu Wang zhen at kemper.freedesktop.org
Tue Feb 17 19:35:24 PST 2009


 src/bios_reader/bios_reader.c |   60 ++++++++++++++++++++++++++++++++++++++++++
 src/i830_bios.h               |   35 ++++++++++++++++++++++++
 2 files changed, 95 insertions(+)

New commits:
commit 527e8177cde3abbabbcdccee0dbc0dcc0068a1be
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Feb 18 11:26:58 2009 +0800

    bios_reader: parse driver feature BDB

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 4b20e0d..db8f364 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -359,6 +359,64 @@ static void dump_lvds_data(void)
     free(block);
 }
 
+static void dump_driver_feature(void)
+{
+    struct bdb_block *block;
+    struct bdb_driver_feature *feature;
+
+    block = find_section(BDB_DRIVER_FEATURES);
+    if (!block) {
+	printf("No Driver feature data block\n");
+	return;
+    }
+    feature = block->data;
+
+    printf("Driver feature Data Block:\n");
+    printf("\tBoot Device Algorithm: %s\n", feature->boot_dev_algorithm ?
+	    "driver default": "os default");
+    printf("\tBlock display switching when DVD active: %s\n",
+	    YESNO(feature->block_display_switch));
+    printf("\tAllow display switching when in Full Screen DOS: %s\n",
+	    YESNO(feature->allow_display_switch));
+    printf("\tHot Plug DVO: %s\n", YESNO(feature->hotplug_dvo));
+    printf("\tDual View Zoom: %s\n", YESNO(feature->dual_view_zoom));
+    printf("\tDriver INT 15h hook: %s\n", YESNO(feature->int15h_hook));
+    printf("\tEnable Sprite in Clone Mode: %s\n", YESNO(feature->sprite_in_clone));
+    printf("\tUse 00000110h ID for Primary LFP: %s\n", YESNO(feature->primary_lfp_id));
+    printf("\tBoot Mode X: %u\n", feature->boot_mode_x);
+    printf("\tBoot Mode Y: %u\n", feature->boot_mode_y);
+    printf("\tBoot Mode Bpp: %u\n", feature->boot_mode_bpp);
+    printf("\tBoot Mode Refresh: %u\n", feature->boot_mode_refresh);
+    printf("\tEnable LFP as primary: %s\n", YESNO(feature->enable_lfp_primary));
+    printf("\tSelective Mode Pruning: %s\n", YESNO(feature->selective_mode_pruning));
+    printf("\tDual-Frequency Graphics Technology: %s\n", YESNO(feature->dual_frequency));
+    printf("\tDefault Render Clock Frequency: %s\n", feature->render_clock_freq ? "low" : "high");
+    printf("\tNT 4.0 Dual Display Clone Support: %s\n", YESNO(feature->nt_clone_support));
+    printf("\tDefault Power Scheme user interface: %s\n", feature->power_scheme_ui ? "3rd party":"CUI");
+    printf("\tSprite Display Assignment when Overlay is Active in Clone Mode: %s\n",
+	    feature->sprite_display_assign ? "primary" : "secondary");
+    printf("\tDisplay Maintain Aspect Scaling via CUI: %s\n", YESNO(feature->cui_aspect_scaling));
+    printf("\tPreserve Aspect Ratio: %s\n", YESNO(feature->preserve_aspect_ratio));
+    printf("\tEnable SDVO device power down: %s\n", YESNO(feature->sdvo_device_power_down));
+    printf("\tCRT hotplug: %s\n", YESNO(feature->crt_hotplug));
+    printf("\tLVDS config: ");
+    switch (feature->lvds_config) {
+	case BDB_DRIVER_NO_LVDS:
+	    printf("No LVDS\n");
+	    break;
+	case BDB_DRIVER_INTER_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");
+	    break;
+    }
+    free(block);
+}
+
 int main(int argc, char **argv)
 {
     int fd;
@@ -433,5 +491,7 @@ int main(int argc, char **argv)
     dump_lvds_data();
     dump_lvds_ptr_data();
 
+    dump_driver_feature();
+
     return 0;
 }
diff --git a/src/i830_bios.h b/src/i830_bios.h
index 39706ac..2dcc092 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -395,6 +395,41 @@ struct vch_bdb_22 {
     struct vch_panel_data   panels[16];
 } __attribute__((packed));
 
+#define BDB_DRIVER_NO_LVDS	0
+#define BDB_DRIVER_INTER_LVDS	1
+#define BDB_DRIVER_SDVO_LVDS	2
+#define BDB_DRIVER_ALL_LVDS	3
+
+struct bdb_driver_feature {
+    uint8_t	boot_dev_algorithm:1;
+    uint8_t	block_display_switch:1;
+    uint8_t	allow_display_switch:1;
+    uint8_t	hotplug_dvo:1;
+    uint8_t	dual_view_zoom:1;
+    uint8_t	int15h_hook:1;
+    uint8_t	sprite_in_clone:1;
+    uint8_t	primary_lfp_id:1;
+
+    uint16_t	boot_mode_x;
+    uint16_t	boot_mode_y;
+    uint8_t	boot_mode_bpp;
+    uint8_t	boot_mode_refresh;
+
+    uint16_t	enable_lfp_primary:1;
+    uint16_t	selective_mode_pruning:1;
+    uint16_t	dual_frequency:1;
+    uint16_t	render_clock_freq:1; /* 0: high freq; 1: low freq */
+    uint16_t	nt_clone_support:1;
+    uint16_t	power_scheme_ui:1; /* 0: CUI; 1: 3rd party */
+    uint16_t	sprite_display_assign:1; /* 0: secondary; 1: primary */
+    uint16_t	cui_aspect_scaling:1;
+    uint16_t	preserve_aspect_ratio:1;
+    uint16_t	sdvo_device_power_down:1;
+    uint16_t	crt_hotplug:1;
+    uint16_t	lvds_config:2;
+    uint16_t	reserved:3;
+} __attribute__((packed));
+
 #ifndef REG_DUMPER
 int i830_bios_init(ScrnInfoPtr pScrn);
 #endif


More information about the xorg-commit mailing list