From a1f842d158dfd1fea833b8f290c6f11063a783c2 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Fri, 9 Jun 2017 18:57:07 +0200 Subject: drivers/xgi: Fix usage of NGI Kconfig options This driver reinvented MAINBOARD_DO_NATIVE_VGA_INIT in a very special way: If it wasn't set, perform native gfx init in textmode, if it was set, perform native gfx init in linear framebuffer mode. Test for LINEAR_FRAMEBUFFER instead and make the native gfx init optional. Also, make Kconfig reflect the actual behaviour. Change-Id: If20fd1f5b0f4127b426e8ff94acc61fcd4eb49af Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/20131 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- src/drivers/xgi/z9s/z9s.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/drivers/xgi/z9s/z9s.c') diff --git a/src/drivers/xgi/z9s/z9s.c b/src/drivers/xgi/z9s/z9s.c index 86808fce11..4c1e44a828 100644 --- a/src/drivers/xgi/z9s/z9s.c +++ b/src/drivers/xgi/z9s/z9s.c @@ -40,12 +40,14 @@ static void xgi_z9s_init(struct device *dev) u8 ret; struct xgifb_video_info *xgifb_info; - printk(BIOS_INFO, "XGI Z9s: initializing video device\n"); - xgifb_info = malloc(sizeof(*xgifb_info)); - ret = xgifb_probe(dev, xgifb_info); - if (!ret) - xgifb_modeset(dev, xgifb_info); - free(xgifb_info); + if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT)) { + printk(BIOS_INFO, "XGI Z9s: initializing video device\n"); + xgifb_info = malloc(sizeof(*xgifb_info)); + ret = xgifb_probe(dev, xgifb_info); + if (!ret) + xgifb_modeset(dev, xgifb_info); + free(xgifb_info); + } } static struct device_operations xgi_z9s_ops = { -- cgit v1.2.3