aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/xgi/common/xgi_coreboot.c
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineeringinc.com>2015-02-05 01:02:57 -0600
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2015-02-06 19:22:36 +0100
commit08c15ed266d8dec11de9b2eed097678b454ea7fc (patch)
treef7b8fa8c71f06a306dbfe7d727ef28ff7499afa0 /src/drivers/xgi/common/xgi_coreboot.c
parent114baa0a0ad8132964d8c60bd9583c339b6fcc51 (diff)
drivers/xgi: Fix legacy VGA text mode initialization
TEST: Booted KFSN4-DRE with on-board XGI Volari Z9s Initial text from coreboot appeared, and the Linux console was displayed immediately at the start of kernel initialization. After boot was complete the text mode console continued to behave normally. SeaBIOS does not currently make use of the legacy VGA text-mode display. Change-Id: I2177a1d00e6f07db661dd99fe0184e2c228404d1 Signed-off-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-on: http://review.coreboot.org/8360 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/drivers/xgi/common/xgi_coreboot.c')
-rwxr-xr-xsrc/drivers/xgi/common/xgi_coreboot.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/src/drivers/xgi/common/xgi_coreboot.c b/src/drivers/xgi/common/xgi_coreboot.c
index 84ed81abd1..a4abe71fa0 100755
--- a/src/drivers/xgi/common/xgi_coreboot.c
+++ b/src/drivers/xgi/common/xgi_coreboot.c
@@ -123,12 +123,14 @@ int xgifb_probe(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info)
xgifb_info->video_size = video_size_max;
}
- /* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE */
- xgifb_reg_or(XGISR,
- IND_SIS_PCI_ADDRESS_SET,
- (SIS_PCI_ADDR_ENABLE | SIS_MEM_MAP_IO_ENABLE));
- /* Enable 2D accelerator engine */
- xgifb_reg_or(XGISR, IND_SIS_MODULE_ENABLE, SIS_ENABLE_2D);
+ if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) {
+ /* Enable PCI_LINEAR_ADDRESSING and MMIO_ENABLE */
+ xgifb_reg_or(XGISR,
+ IND_SIS_PCI_ADDRESS_SET,
+ (SIS_PCI_ADDR_ENABLE | SIS_MEM_MAP_IO_ENABLE));
+ /* Enable 2D accelerator engine */
+ xgifb_reg_or(XGISR, IND_SIS_MODULE_ENABLE, SIS_ENABLE_2D);
+ }
hw_info->ulVideoMemorySize = xgifb_info->video_size;
@@ -265,7 +267,10 @@ int xgifb_probe(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info)
xgifb_info->mode_idx =
XGIfb_GetXG21DefaultLVDSModeIdx(xgifb_info);
else
- xgifb_info->mode_idx = DEFAULT_MODE;
+ if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT))
+ xgifb_info->mode_idx = DEFAULT_MODE;
+ else
+ xgifb_info->mode_idx = DEFAULT_TEXT_MODE;
}
if (xgifb_info->mode_idx < 0) {
@@ -406,10 +411,16 @@ int xgifb_modeset(struct pci_dev *pdev, struct xgifb_video_info *xgifb_info)
}
#else
/* FIXME
- * Text mode does not work
+ * Text mode is slightly unstable/jittery (bad/incomplete DDR init?)
*/
+
+ /* Initialize standard VGA text mode */
vga_io_init();
vga_textmode_init();
+ printk(BIOS_INFO, "XGI VGA text mode initialized\n");
+
+ /* if we don't have console, at least print something... */
+ vga_line_write(0, "XGI VGA text mode initialized");
#endif
return 0;