[coreboot-gerrit] New patch to review for coreboot: nb/intel/sandybridge/gma: add disable function
Patrick Rudolph (siro@das-labor.org)
gerrit at coreboot.org
Fri Oct 16 13:25:39 CEST 2015
Patrick Rudolph (siro at das-labor.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11919
-gerrit
commit 741d460e313cc3f095776b710bf231bb6bb5356e
Author: Patrick Rudolph <siro at das-labor.org>
Date: Thu Oct 15 15:35:12 2015 +0200
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/Ivybridge.
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 at das-labor.org>
---
src/northbridge/intel/sandybridge/gma.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index d1779db..bf340e9 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,
};
More information about the coreboot-gerrit
mailing list