0041-nb-haswell-Fully-disable-iGPU-when-dGPU-is-used.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 0801b3ba8a0ce0109e30d27f405c912d5d705e9c Mon Sep 17 00:00:00 2001
  2. From: Leah Rowe <info@minifree.org>
  3. Date: Sat, 6 Apr 2024 01:22:47 +0100
  4. Subject: [PATCH 1/1] nb/haswell: Fully disable iGPU when dGPU is used
  5. My earlier patch disabled decode *and* disabled the iGPU itself, but
  6. a subsequent revision disabled only VGA decode. Upon revisiting, I
  7. found that, actually, yes, you also need to disable the iGPU entirely.
  8. Tested on Dell 9020 SFF using broadwell MRC, with both iGPU and dGPU.
  9. With this patch, the iGPU is completely disabled when you install a
  10. graphics card, but the iGPU is available to use when no graphics card
  11. is present.
  12. For more context, see:
  13. Author: Leah Rowe <info@minifree.org>
  14. Date: Fri Feb 23 13:33:31 2024 +0000
  15. nb/haswell: Disable iGPU when dGPU is used
  16. And look at the Gerrit comments:
  17. https://review.coreboot.org/c/coreboot/+/80717/
  18. So, my original submission on change 80717 was actually correct.
  19. This patch fixes the issue. I tested on iGPU and dGPU, with both
  20. broadwell and haswell mrc.bin.
  21. Signed-off-by: Leah Rowe <info@minifree.org>
  22. ---
  23. src/northbridge/intel/haswell/gma.c | 3 +++
  24. 1 file changed, 3 insertions(+)
  25. diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
  26. index 48a0ba54c7..f0b848852d 100644
  27. --- a/src/northbridge/intel/haswell/gma.c
  28. +++ b/src/northbridge/intel/haswell/gma.c
  29. @@ -465,6 +465,9 @@ static void gma_func0_disable(struct device *dev)
  30. {
  31. /* Disable VGA decode */
  32. pci_or_config16(pcidev_on_root(0, 0), GGC, 1 << 1);
  33. +
  34. + /* Required or else the graphics card doesn't work */
  35. + dev->enabled = 0;
  36. }
  37. static struct device_operations gma_func0_ops = {
  38. --
  39. 2.39.2