diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2018-08-09 11:31:51 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2018-08-22 18:26:14 +0000 |
commit | e6c8f7ec200e72c76eb2ff73720acff9c88e73c8 (patch) | |
tree | 1db722038859476c1bb597ebee785bf6d5b1118b /src/northbridge/intel/pineview | |
parent | db2f91b1f7924ce3953358045d17d2e328887a6b (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/pineview')
-rw-r--r-- | src/northbridge/intel/pineview/gma.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/northbridge/intel/pineview/gma.c b/src/northbridge/intel/pineview/gma.c index 8cf4d22554..02100e908d 100644 --- a/src/northbridge/intel/pineview/gma.c +++ b/src/northbridge/intel/pineview/gma.c @@ -275,6 +275,8 @@ static void gma_func0_init(struct device *dev) struct resource *pio_res; struct northbridge_intel_pineview_config *conf = dev->chip_info; + int vga_disable = (pci_read_config16(dev, GGC) & 2) >> 1; + /* Find base addresses */ mmio_res = find_resource(dev, 0x10); gtt_res = find_resource(dev, 0x1c); @@ -282,11 +284,17 @@ static void gma_func0_init(struct device *dev) physbase = pci_read_config32(dev, 0x5c) & ~0xf; if (gtt_res && gtt_res->base && physbase && pio_res && pio_res->base) { - printk(BIOS_SPEW, "Initializing VGA. MMIO 0x%llx\n", - mmio_res->base); - intel_gma_init(conf, dev, res2mmio(mmio_res, 0, 0), - res2mmio(gtt_res, 0, 0), - physbase, pio_res->base); + if (vga_disable) { + printk(BIOS_INFO, + "IGD is not decoding legacy VGA MEM and IO: skipping NATIVE graphic init\n"); + } else { + printk(BIOS_SPEW, "Initializing VGA. MMIO 0x%llx\n", + mmio_res->base); + intel_gma_init(conf, dev, + res2mmio(mmio_res, 0, 0), + res2mmio(gtt_res, 0, 0), + physbase, pio_res->base); + } } /* Linux relies on VBT for panel info. */ |