summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2015-10-15 15:35:12 +0200
committerMartin Roth <martinroth@google.com>2015-10-29 17:08:48 +0100
commite11f6c3be168b1efde7fa1b5fd8754b9b8057dc9 (patch)
tree9f33dc619e1717f95f51cc00c72bea954929011d /src/northbridge
parent114a9489ed688403e202ada5eb22fc171a769594 (diff)
nb/intel/sandybridge/gma: add disable function
Issue observed: In a multi GPU setup (IGD and PEG) the system still uses the IGD. CONFIG_ONBOARD_VGA_IS_PRIMARY has no effect on Sandy/Ivy Bridge. Test system: * Gigabyte GA-B75M-D3H * Intel Pentium CPU G2130 * ATI Radeon HD4780 Problem description: The GMA is missing a disable function. Problem solution: Add a GMA disable function. Deactivate PCI device until remaining multi GPU issues are resolved. Do not claim VGA decode any more. Final testing results: The system is able to boot using the PEG device as primary VGA device. Change-Id: I52af32df41ca22f808b119f3a4099849c74068b3 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: http://review.coreboot.org/11919 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/intel/sandybridge/gma.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index d1779db8da..bf340e9f61 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -634,6 +634,19 @@ static void gma_ssdt(device_t device)
drivers_intel_gma_displays_ssdt_generate(gfx);
}
+/* called by pci set_vga_bridge function */
+static void gma_func0_disable(struct device *dev)
+{
+ u16 reg16;
+ device_t dev_host = dev_find_slot(0, PCI_DEVFN(0,0));
+
+ reg16 = pci_read_config16(dev_host, GGC);
+ reg16 |= (1 << 1); /* disable VGA decode */
+ pci_write_config16(dev_host, GGC, reg16);
+
+ dev->enabled = 0;
+}
+
static struct pci_operations gma_pci_ops = {
.set_subsystem = gma_set_subsystem,
};
@@ -646,6 +659,7 @@ static struct device_operations gma_func0_ops = {
.init = gma_func0_init,
.scan_bus = 0,
.enable = 0,
+ .disable = gma_func0_disable,
.ops_pci = &gma_pci_ops,
};