From c3cbe9433c22b5ac3bd616c858fb87b0de3ebab8 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sun, 6 Aug 2017 16:00:18 +0200 Subject: nb/intel/x4x/gma.c: Probe VGA EDID on DVI-I ports This allows the use of the native VGA init on boards featuring DVI-I ports. Digital output is not supported. Change-Id: I11a4dd68746e06c7e27ecf3e765bdd0d8cf40515 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/20890 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/northbridge/intel/x4x/gma.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c index e91d778774..db96facbef 100644 --- a/src/northbridge/intel/x4x/gma.c +++ b/src/northbridge/intel/x4x/gma.c @@ -74,6 +74,15 @@ static void intel_gma_init(const struct northbridge_intel_x4x_config *info, u32 pixel_m1 = 1; u32 pixel_m2 = 1; + u8 vga_gmbus = GMBUS_PORT_VGADDC; + + if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_B)) + vga_gmbus = GMBUS_PORT_DPB; + else if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_C)) + vga_gmbus = GMBUS_PORT_DPC; + else if (IS_ENABLED(CONFIG_GFX_GMA_ANALOG_I2C_HDMI_D)) + vga_gmbus = GMBUS_PORT_DPD; + vga_gr_write(0x18, 0); /* Set up GTT */ @@ -113,7 +122,11 @@ static void intel_gma_init(const struct northbridge_intel_x4x_config *info, udelay(1); - intel_gmbus_read_edid(mmio + GMBUS0, GMBUS_PORT_VGADDC, 0x50, edid_data, + /* + * TODO: check if it is actually an analog display. + * No harm is done but the console output could be confusing. + */ + intel_gmbus_read_edid(mmio + GMBUS0, vga_gmbus, 0x50, edid_data, sizeof(edid_data)); intel_gmbus_stop(mmio + GMBUS0); decode_edid(edid_data, -- cgit v1.2.3