From 5869fa2e631d5d2483a4ee0445e6496120b42f02 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Fri, 20 Jul 2012 12:29:33 +0200 Subject: Allow shutting down internal graphics if plugin graphics are preferred VGA is this part-legacy thing that can cause trouble... For this, introduce device_t->disable(dev) method, in which a driver can take care to deregister the device if necessary. Change-Id: I3fecec07f402e530458b79eda30b2c274101fefa Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/1251 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/devices/device.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/devices') diff --git a/src/devices/device.c b/src/devices/device.c index d3f9b52cc4..de27e88496 100644 --- a/src/devices/device.c +++ b/src/devices/device.c @@ -762,6 +762,14 @@ static void set_vga_bridge_bits(void) vga = vga_onboard; } + /* If we prefer plugin VGA over chipset VGA, the chipset might + want to know. */ + if (!CONFIG_ONBOARD_VGA_IS_PRIMARY && (vga != vga_onboard) && + vga_onboard && vga_onboard->ops && vga_onboard->ops->disable) { + printk(BIOS_DEBUG, "Use plugin graphics over integrated.\n"); + vga_onboard->ops->disable(vga_onboard); + } + if (vga) { /* VGA is first add-on card or the only onboard VGA. */ printk(BIOS_DEBUG, "Setting up VGA for %s\n", dev_path(vga)); -- cgit v1.2.3