summaryrefslogtreecommitdiff
path: root/src/drivers/aspeed/ast2050
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2019-09-30 11:02:04 +0200
committerPatrick Rudolph <siro@das-labor.org>2019-12-12 12:49:01 +0000
commitf1a4ae0a48e90de2a8a029c38c4583506b02a676 (patch)
tree1aa0739c6af8df97746f2bfc420cb94201cf458d /src/drivers/aspeed/ast2050
parent199f98bc433f36fd0f91edd2495ecc3fd23afdbf (diff)
downloadcoreboot-f1a4ae0a48e90de2a8a029c38c4583506b02a676.tar.xz
drivers/aspeed/common: Add support for high resolution framebuffer
* Implement reading EDID over software I2C. * Fall back to VGA if no monitor connected for BMC KVM * Copy the linux kernel code and add a bunch of wrapper structs to make it compile. * Convert the EDID to a drm_display_mode, which is understood by the driver. * Properly select HAVE_LINEAR_FRAMEBUFFER and HAVE_VGA_TEXT_FRAMEBUFFER Tested on Supermicro X11SSH-TF using FullHD VGA monitor. Initializes the graphics in about 1 second, which is twice as fast as the VGA Option ROM. The framebuffer is advertised and working in tianocore. Change-Id: I7803566b64158405efc04a39f80a0ec98b44e646 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35726 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/aspeed/ast2050')
-rw-r--r--src/drivers/aspeed/ast2050/Kconfig1
-rw-r--r--src/drivers/aspeed/ast2050/ast2050.c18
2 files changed, 12 insertions, 7 deletions
diff --git a/src/drivers/aspeed/ast2050/Kconfig b/src/drivers/aspeed/ast2050/Kconfig
index 337b1817f3..7d2c728204 100644
--- a/src/drivers/aspeed/ast2050/Kconfig
+++ b/src/drivers/aspeed/ast2050/Kconfig
@@ -1,5 +1,4 @@
config DRIVERS_ASPEED_AST2050
bool
select DRIVERS_ASPEED_AST_COMMON
- select HAVE_VGA_TEXT_FRAMEBUFFER
select MAINBOARD_HAS_NATIVE_VGA_INIT
diff --git a/src/drivers/aspeed/ast2050/ast2050.c b/src/drivers/aspeed/ast2050/ast2050.c
index b1bd276c74..67a1a803fe 100644
--- a/src/drivers/aspeed/ast2050/ast2050.c
+++ b/src/drivers/aspeed/ast2050/ast2050.c
@@ -48,13 +48,19 @@ static void aspeed_ast2050_init(struct device *dev)
outb(0xa6, 0x3d4); outb(0x2f, 0x3d5);
outb(0xa7, 0x3d4); outb(0x3f, 0x3d5);
- /* Initialize standard VGA text mode */
- vga_io_init();
- vga_textmode_init();
- printk(BIOS_INFO, "ASpeed VGA text mode initialized\n");
+ if (CONFIG(VGA_TEXT_FRAMEBUFFER)) {
+ /* Initialize standard VGA text mode */
+ vga_io_init();
- /* if we don't have console, at least print something... */
- vga_line_write(0, "ASpeed VGA text mode initialized");
+ vga_textmode_init();
+ printk(BIOS_INFO, "ASpeed VGA text mode initialized\n");
+
+ /* if we don't have console, at least print something... */
+ vga_line_write(0, "ASpeed VGA text mode initialized");
+ } else if (CONFIG(GENERIC_LINEAR_FRAMEBUFFER)) {
+ ast_driver_framebuffer_init(&drm_dev, 0);
+ printk(BIOS_INFO, "ASpeed high resolution framebuffer initialized\n");
+ }
}
static struct device_operations aspeed_ast2050_ops = {