summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-02-22 17:56:53 +0000
committerLeah Rowe <leah@libreboot.org>2024-02-22 17:56:53 +0000
commit41ccbb21966d1ccf4dcba9239e2e3debf1fcbc60 (patch)
tree971c384cce617610f99683ec8a12493fbb85c6ac
parentc64950d0b8cdf0cb973a6add98d6bb2a631e529f (diff)
haswell: disable igpu when dgpu is used9020vga
normally, haswell mrc.bin handles this, if hide-peg-from-mrc is disabled, broadwell mrc allows use of both gpus - so i had to disable it in coreboot, using the normal method in gma.c Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--config/coreboot/default/patches/0036-nb-haswell-disable-igpu-when-dgpu-is-used.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/config/coreboot/default/patches/0036-nb-haswell-disable-igpu-when-dgpu-is-used.patch b/config/coreboot/default/patches/0036-nb-haswell-disable-igpu-when-dgpu-is-used.patch
new file mode 100644
index 0000000..34d5d8b
--- /dev/null
+++ b/config/coreboot/default/patches/0036-nb-haswell-disable-igpu-when-dgpu-is-used.patch
@@ -0,0 +1,47 @@
+From aa04e2b9f63aae953040816306a45bdf86a2195f Mon Sep 17 00:00:00 2001
+From: Leah Rowe <info@minifree.org>
+Date: Thu, 22 Feb 2024 17:52:03 +0000
+Subject: [PATCH 1/1] nb/haswell: disable igpu when dgpu is used
+
+normally, this is done with haswell mrc, which handles
+that, but when using broadwell, the igpu is not disabled,
+and legacy vga cycles are not routed to the dgpu
+
+add this behaviour in gma.g for broadwell mrc.bin
+
+tested on dell optiplex 9020 sff
+
+Signed-off-by: Leah Rowe <info@minifree.org>
+---
+ src/northbridge/intel/haswell/gma.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
+index 6e6948b70f..ee4d321261 100644
+--- a/src/northbridge/intel/haswell/gma.c
++++ b/src/northbridge/intel/haswell/gma.c
+@@ -461,12 +461,21 @@ static void gma_generate_ssdt(const struct device *dev)
+ drivers_intel_gma_displays_ssdt_generate(&chip->gfx);
+ }
+
++static void gma_func0_disable(struct device *dev)
++{
++ /* Disable VGA decode */
++ pci_or_config16(pcidev_on_root(0, 0), GGC, 1 << 1);
++
++ dev->enabled = 0;
++}
++
+ static struct device_operations gma_func0_ops = {
+ .read_resources = pci_dev_read_resources,
+ .set_resources = pci_dev_set_resources,
+ .enable_resources = pci_dev_enable_resources,
+ .init = gma_func0_init,
+ .acpi_fill_ssdt = gma_generate_ssdt,
++ .vga_disable = gma_func0_disable,
+ .ops_pci = &pci_dev_ops_pci,
+ };
+
+--
+2.39.2
+