summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/x4x
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2018-08-09 11:31:51 +0200
committerFelix Held <felix-coreboot@felixheld.de>2018-08-22 18:26:14 +0000
commite6c8f7ec200e72c76eb2ff73720acff9c88e73c8 (patch)
tree1db722038859476c1bb597ebee785bf6d5b1118b /src/northbridge/intel/x4x
parentdb2f91b1f7924ce3953358045d17d2e328887a6b (diff)
nb/intel/*/gma.c: Skip NGI when VGA decode is not enabled
Writes to VGA MEM and IO by NGI are invalid if the IGD is not decoding them. Change-Id: I4b9329d14105eb563a0d4aea6ef75ff11febf6df Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/27984 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge/intel/x4x')
-rw-r--r--src/northbridge/intel/x4x/gma.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index 2d2feee61c..d0c40b1d8d 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -60,7 +60,7 @@ void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb)
static void gma_func0_init(struct device *dev)
{
- u16 reg16, ggc;
+ u16 reg16;
u32 reg32;
/* IGD needs to be Bus Master */
@@ -74,11 +74,16 @@ static void gma_func0_init(struct device *dev)
reg16 |= 0xbc;
pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x2, 0)), 0xcc, reg16);
- ggc = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0, 0)), D0F0_GGC);
+ int vga_disable = pci_read_config16(dev, D0F0_GGC);
if (IS_ENABLED(CONFIG_MAINBOARD_USE_LIBGFXINIT)) {
- int lightup_ok;
- gma_gfxinit(&lightup_ok);
+ if (vga_disable) {
+ printk(BIOS_INFO,
+ "IGD is not decoding legacy VGA MEM and IO: skipping NATIVE graphic init\n");
+ } else {
+ int lightup_ok;
+ gma_gfxinit(&lightup_ok);
+ }
} else {
pci_dev_init(dev);
}