mikeb mikeb has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31448 )
Change subject: src/device/pci: Add support for discrete VGA initialization and OpROM loading ......................................................................
Patch Set 1:
(1 comment)
@Kyösti :
Patch Set 1:
AFAIK it is forbidden to route the IO and MMIO regions related to VGA Option Rom to two different PCI functions. Not sure how you could even run two option roms without redoing the routing in between.
I think the intention here has been to make sure that the graphics card, for which we have option rom included in CBFS, gets the routing setup. Then again, the code is multi-node/hypertransport related so all that may be leftovers from fam15 model0 (before TN/RL).
Original patches by HJK loaded both integrated GPU's and discrete GPU's Option ROMs , but executed only the integrated GPU's OpROM. While trying to optimize these patches I noticed that there are no negative consequences from running both of these OpROMs, so I removed a check and let them run both - also hoping that it could help to get Crossfire working sometime in the future. The GPUs of this laptop - integrated and discrete - have nearly the same performance and were meant to be ran in tandem, that's why I thought that letting both OpROMs to run could be a good idea because maybe a discrete OpROM is configuring something important related to Crossfire.
https://review.coreboot.org/#/c/31448/1/src/device/pci_device.c File src/device/pci_device.c:
https://review.coreboot.org/#/c/31448/1/src/device/pci_device.c@803 PS1, Line 803: if (pci_class == PCI_CLASS_DISPLAY_VGA)
I don't quite understand how you could use the class to distinguish between integrated and discrete […]
If this detection will turn out as imperfect - I will improve it. Or maybe I could simplify it to just "VGA ROM probe failed" because it will be obvious if this GPU is integrated or discrete from reading the debug lines above it. Please let me know if I should do it. By the way the standard desktop GPUs should have their own non-volatile memory with Option ROM stored inside.