summaryrefslogtreecommitdiff
path: root/config/coreboot/default/patches
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-04-05 23:53:03 +0100
committerLeah Rowe <leah@libreboot.org>2024-04-06 01:28:10 +0100
commit4134a883d0d8dd4020f2ddca7416e0b9f82b8843 (patch)
tree5683aee5a7fccd60aa338b8ff227ba9d03110322 /config/coreboot/default/patches
parentf7283fa10dad76f20ec4ed2841dbbbb00ee9c865 (diff)
add 9020 sff/mt targets that use broadwell mrc
broadwell mrc has better peg handling and can support 16gb modules on broadwell machines - the blob can be used on haswell machines too, instead of haswell mrc, and it might support 16gb modules on these machines (not yet tested, but using broadwell mrc does at least boot as reliably as haswell mrc anyway) one little quirk with haswell mrc is that it actually handles vga decode, disabling the igpu entirely, when a dgpu is used. the broadwell mrc enables both GPUs and does not handle vga decoding, so we must handle this the usual way; my patch for this was merged upstream and i'm also adding it to libreboot, which currently uses an older coreboot revision. this is needed for dgpu to work. see patch: 0040-nb-haswell-Disable-iGPU-when-dGPU-is-used.patch broadwell mrc may also make dealing with nvidia optimus setups more reliable, on laptops that have nvidia GPUs, but this patch does not add bmrc configs for t440p/w541 NOTE: on t440p/w541 laptops with nvidia graphics, the video output is wired to intel but rendering can be offloaded to nvidia. in this setup, we want vga decode to be done on intel, so i've set these configs to enable CONFIG_ONBOARD_VGA_IS_PRIMARY (set it to y) Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'config/coreboot/default/patches')
-rw-r--r--config/coreboot/default/patches/0040-nb-haswell-Disable-iGPU-when-dGPU-is-used.patch54
-rw-r--r--config/coreboot/default/patches/0041-nb-haswell-Fully-disable-iGPU-when-dGPU-is-used.patch51
2 files changed, 105 insertions, 0 deletions
diff --git a/config/coreboot/default/patches/0040-nb-haswell-Disable-iGPU-when-dGPU-is-used.patch b/config/coreboot/default/patches/0040-nb-haswell-Disable-iGPU-when-dGPU-is-used.patch
new file mode 100644
index 00000000..7a02d902
--- /dev/null
+++ b/config/coreboot/default/patches/0040-nb-haswell-Disable-iGPU-when-dGPU-is-used.patch
@@ -0,0 +1,54 @@
+From c6ce9c635e6576c86c546177c3d770dec2f3c9ae Mon Sep 17 00:00:00 2001
+From: Leah Rowe <info@minifree.org>
+Date: Fri, 23 Feb 2024 13:33:31 +0000
+Subject: [PATCH 1/1] nb/haswell: Disable iGPU when dGPU is used
+
+This is usually is handled by Haswell mrc.bin, disabling VGA
+decode on the iGPU when a dGPU is installed. However, Broadwell
+mrc.bin does not, so the iGPU and dGPU are both enabled.
+
+This patch disables legacy VGA cycles for iGPU, under such
+conditions. It has been tested on Broadwell mrc.bin when
+using a graphics card on Dell OptiPlex 9020 SFF (currently
+under review at this time of writing, submitted by Mate
+Kukri).
+
+This patch has also been tested when Haswell mrc.bin is used,
+and there are seemingly no breaking changes caused by it.
+
+Change-Id: I1df0a3aa42f8475b7741007bf3e28c2e089d916b
+Signed-off-by: Leah Rowe <info@minifree.org>
+Reviewed-on: https://review.coreboot.org/c/coreboot/+/80717
+Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
+Reviewed-by: Nico Huber <nico.h@gmx.de>
+---
+ src/northbridge/intel/haswell/gma.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
+index 6e6948b70f..48a0ba54c7 100644
+--- a/src/northbridge/intel/haswell/gma.c
++++ b/src/northbridge/intel/haswell/gma.c
+@@ -461,12 +461,19 @@ 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);
++}
++
+ 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
+
diff --git a/config/coreboot/default/patches/0041-nb-haswell-Fully-disable-iGPU-when-dGPU-is-used.patch b/config/coreboot/default/patches/0041-nb-haswell-Fully-disable-iGPU-when-dGPU-is-used.patch
new file mode 100644
index 00000000..bc8fd55c
--- /dev/null
+++ b/config/coreboot/default/patches/0041-nb-haswell-Fully-disable-iGPU-when-dGPU-is-used.patch
@@ -0,0 +1,51 @@
+From 0801b3ba8a0ce0109e30d27f405c912d5d705e9c Mon Sep 17 00:00:00 2001
+From: Leah Rowe <info@minifree.org>
+Date: Sat, 6 Apr 2024 01:22:47 +0100
+Subject: [PATCH 1/1] nb/haswell: Fully disable iGPU when dGPU is used
+
+My earlier patch disabled decode *and* disabled the iGPU itself, but
+a subsequent revision disabled only VGA decode. Upon revisiting, I
+found that, actually, yes, you also need to disable the iGPU entirely.
+
+Tested on Dell 9020 SFF using broadwell MRC, with both iGPU and dGPU.
+With this patch, the iGPU is completely disabled when you install a
+graphics card, but the iGPU is available to use when no graphics card
+is present.
+
+For more context, see:
+
+Author: Leah Rowe <info@minifree.org>
+Date: Fri Feb 23 13:33:31 2024 +0000
+
+ nb/haswell: Disable iGPU when dGPU is used
+
+And look at the Gerrit comments:
+
+https://review.coreboot.org/c/coreboot/+/80717/
+
+So, my original submission on change 80717 was actually correct.
+This patch fixes the issue. I tested on iGPU and dGPU, with both
+broadwell and haswell mrc.bin.
+
+Signed-off-by: Leah Rowe <info@minifree.org>
+---
+ src/northbridge/intel/haswell/gma.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
+index 48a0ba54c7..f0b848852d 100644
+--- a/src/northbridge/intel/haswell/gma.c
++++ b/src/northbridge/intel/haswell/gma.c
+@@ -465,6 +465,9 @@ static void gma_func0_disable(struct device *dev)
+ {
+ /* Disable VGA decode */
+ pci_or_config16(pcidev_on_root(0, 0), GGC, 1 << 1);
++
++ /* Required or else the graphics card doesn't work */
++ dev->enabled = 0;
+ }
+
+ static struct device_operations gma_func0_ops = {
+--
+2.39.2
+