Patrick Georgi ([email protected]) just uploaded a new patch set to 
gerrit, which you can find at http://review.coreboot.org/1251

-gerrit

commit ce2a44e3cbb5766261da8f1893b64e030edd0070
Author: Patrick Georgi <[email protected]>
Date:   Fri Jul 20 12:29:33 2012 +0200

    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 <[email protected]>
---
 src/devices/device.c        |    8 ++++++++
 src/include/device/device.h |    1 +
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/devices/device.c b/src/devices/device.c
index d3f9b52..de27e88 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));
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 819b789..8cc937f 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -32,6 +32,7 @@ struct device_operations {
        void (*init)(device_t dev);
        unsigned int (*scan_bus)(device_t bus, unsigned int max);
        void (*enable)(device_t dev);
+       void (*disable)(device_t dev);
        void (*set_link)(device_t dev, unsigned int link);
        void (*reset_bus)(struct bus *bus);
 #if CONFIG_GENERATE_SMBIOS_TABLES

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to