[coreboot-gerrit] Change in coreboot[master]: nb/intel/x4x: Don't run NGI if IGD has not been assigned VGA...

Arthur Heymans (Code Review) gerrit at coreboot.org
Sat May 6 18:08:22 CEST 2017


Arthur Heymans has uploaded a new change for review. ( https://review.coreboot.org/19607 )

Change subject: nb/intel/x4x: Don't run NGI if IGD has not been assigned VGA cycles
......................................................................

nb/intel/x4x: Don't run NGI if IGD has not been assigned VGA cycles

The NGI writes to legacy vga registers which can hang some discrete
VGA devices. (mostly AMD devices, Nvidia are fine)

TESTED on ga-g41m-es2l

Change-Id: I0a03e35c0d7f2532edd6cc5e62d1cf07dab57f60
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/northbridge/intel/x4x/gma.c
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/19607/1

diff --git a/src/northbridge/intel/x4x/gma.c b/src/northbridge/intel/x4x/gma.c
index c2df074..b013c47 100644
--- a/src/northbridge/intel/x4x/gma.c
+++ b/src/northbridge/intel/x4x/gma.c
@@ -356,7 +356,7 @@
 
 static void gma_func0_init(struct device *dev)
 {
-	u16 reg16;
+	u16 reg16, ggc;
 	u32 reg32;
 
 	/* IGD needs to be Bus Master */
@@ -370,7 +370,14 @@
 	reg16 |= 0xbc;
 	pci_write_config16(dev_find_slot(0, PCI_DEVFN(0x2, 0)), 0xcc, reg16);
 
-	if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT))
+	ggc = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0, 0)), D0F0_GGC);
+
+	/*
+	 * Don't run native graphic init when VGA cycles are not assigned since
+	 * this can cause issues with some discrete GPUs.
+	 */
+	if (IS_ENABLED(CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT) &&
+		!(ggc & (1 << 1)))
 		native_init(dev);
 	else
 		pci_dev_init(dev);

-- 
To view, visit https://review.coreboot.org/19607
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a03e35c0d7f2532edd6cc5e62d1cf07dab57f60
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>



More information about the coreboot-gerrit mailing list