xf86-video-intel: 2 commits - src/bios_reader/bios_reader.c src/i830_bios.h
Jesse Barnes
jbarnes at kemper.freedesktop.org
Tue Aug 18 10:57:30 PDT 2009
src/bios_reader/bios_reader.c | 34 ++++++++++++++++++++++++++++++++++
src/i830_bios.h | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)
New commits:
commit a3962e6f74ddd954ae1390d150a347745d7bdb24
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Tue Aug 18 10:56:50 2009 -0700
Print block length of backlight table
For debugging VBIOS dumps
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 2a69d27..8846739 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -176,7 +176,7 @@ static void dump_backlight_info(void)
backlight = block->data;
- printf("Backlight info block:\n");
+ printf("Backlight info block (len %d):\n", block->size);
if (sizeof(struct blc_struct) != backlight->blcstruct_size) {
printf("\tBacklight struct sizes don't match (expected %d, got %d), skipping\n",
commit 320f21669900f99a7daf8f2294f37be9ad71d05f
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Mon Aug 17 15:19:41 2009 -0700
Dump LVDS backlight info from bios_reader
Add LVDS backlight and power VBT structures and dump from the BIOS reader.
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 3b880a7..2a69d27 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -163,6 +163,39 @@ static void dump_general_features(void)
free(block);
}
+static void dump_backlight_info(void)
+{
+ struct bdb_block *block;
+ struct bdb_lvds_backlight *backlight;
+ struct blc_struct *blc;
+
+ block = find_section(BDB_LVDS_BACKLIGHT);
+
+ if (!block)
+ return;
+
+ backlight = block->data;
+
+ printf("Backlight info block:\n");
+
+ if (sizeof(struct blc_struct) != backlight->blcstruct_size) {
+ printf("\tBacklight struct sizes don't match (expected %d, got %d), skipping\n",
+ sizeof(struct blc_struct), backlight->blcstruct_size);
+ return;
+ }
+
+ blc = &backlight->panels[panel_type];
+
+ printf("\tInverter type: %d\n", blc->inverter_type);
+ printf("\t polarity: %d\n", blc->inverter_polarity);
+ printf("\t GPIO pins: %d\n", blc->gpio_pins);
+ printf("\t GMBUS speed: %d\n", blc->gmbus_speed);
+ printf("\t PWM freq: %d\n", blc->pwm_freq);
+ printf("\tMinimum brightness: %d\n", blc->min_brightness);
+ printf("\tI2C slave addr: 0x%02x\n", blc->i2c_slave_addr);
+ printf("\tI2C command: 0x%02x\n", blc->i2c_cmd);
+}
+
static void dump_general_definitions(void)
{
struct bdb_block *block;
@@ -524,6 +557,7 @@ int main(int argc, char **argv)
dump_lvds_options();
dump_lvds_data();
dump_lvds_ptr_data();
+ dump_backlight_info();
dump_driver_feature();
diff --git a/src/i830_bios.h b/src/i830_bios.h
index 8a3025e..754fc86 100644
--- a/src/i830_bios.h
+++ b/src/i830_bios.h
@@ -395,6 +395,44 @@ struct vch_bdb_22 {
struct vch_panel_data panels[16];
} __attribute__((packed));
+#define BLC_INVERTER_TYPE_NONE 0
+#define BLC_INVERTER_TYPE_I2C 1
+#define BLC_INVERTER_TYPE_PWM 2
+
+#define BLC_GPIO_NONE 0
+#define BLC_GPIO_I2C 1
+#define BLC_GPIO_CRT_DDC 2
+#define BLC_GPIO_DVI_DDC 3
+#define BLC_GPIO_SDVO_I2C 5
+
+struct blc_struct {
+ uint8_t inverter_type:2;
+ uint8_t inverter_polarity:1; /* 1 means inverted (0 = max brightness) */
+ uint8_t gpio_pins:3;
+ uint8_t gmbus_speed:2;
+ uint16_t pwm_freq; /* in Hz */
+ uint8_t min_brightness; /* (0-255) */
+ uint8_t i2c_slave_addr;
+ uint8_t i2c_cmd;
+} __attribute__((packed));
+
+struct bdb_lvds_backlight {
+ uint8_t blcstruct_size;
+ struct blc_struct panels[16];
+} __attribute__((packed));
+
+struct bdb_lvds_power {
+ uint8_t dpst_enabled:1;
+ uint8_t pwr_prefs:3;
+ uint8_t rsvd1:3;
+ uint8_t als_enabled:1;
+ uint16_t als_backlight1;
+ uint16_t als_backlight2;
+ uint16_t als_backlight3;
+ uint16_t als_backlight4;
+ uint16_t als_backlight5;
+} __attribute__((packed));
+
#define BDB_DRIVER_NO_LVDS 0
#define BDB_DRIVER_INT_LVDS 1
#define BDB_DRIVER_SDVO_LVDS 2
More information about the xorg-commit
mailing list