Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/21448
Change subject: drivers/intel/gma/vbt.c: Add GENERAL DEFINITIONS block to fake vbt ......................................................................
drivers/intel/gma/vbt.c: Add GENERAL DEFINITIONS block to fake vbt
This is needed for Linux (at least 4.12) to know on which DDC gmbus to probe for VGA edid.
TESTED on dg43gt: Use NGI with a payload like grub that doesn't override VBT (seavgabios) with a DVI-I to VGA adapter and observe that Linux can properly modeset the display.
Change-Id: I5bce00d2e37d77c27cf0022c7dab3444c3699dcf Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/drivers/intel/gma/vbt.c 1 file changed, 15 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/21448/1
diff --git a/src/drivers/intel/gma/vbt.c b/src/drivers/intel/gma/vbt.c index c908eb4..ffb56e9 100644 --- a/src/drivers/intel/gma/vbt.c +++ b/src/drivers/intel/gma/vbt.c @@ -69,6 +69,21 @@
ptr += sizeof (*genfeat);
+ *ptr++ = BDB_GENERAL_DEFINITIONS; + *ptr++ = sizeof(struct bdb_general_definitions); + *ptr++ = sizeof(struct bdb_general_definitions) >> 8; + struct bdb_general_definitions *const gendef = + (struct bdb_general_definitions *)ptr; + if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_B)) + gendef->crt_ddc_gmbus_pin = GMBUS_PORT_DPB; + else if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_C)) + gendef->crt_ddc_gmbus_pin = GMBUS_PORT_DPC; + else if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_D)) + gendef->crt_ddc_gmbus_pin = GMBUS_PORT_DPD; + else + gendef->crt_ddc_gmbus_pin = GMBUS_PORT_VGADDC; + ptr += sizeof(*gendef); + bdb_head->bdb_size = ptr - (u8 *)bdb_head; head->vbt_size = ptr - (u8 *)head; head->vbt_checksum = 0;