Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/49016 )
Change subject: device: Select VGA_ROM_RUN for non-FSP solution with PCIE DGPU ......................................................................
Patch Set 3:
Is this for mainboards that have both integrated and discrete graphics onboard? or only discrete graphics?
Very nice question Nico, i was about to come to this disucssion. We are looking for two mainboard design
- only discrete GFX over PCIE (no IGD)=> This i'm could able to achieve easily using MAINBOARD_HAS_DGPU_VGA_INIT and MAINBOARD_NO_FSP_GOP Kconfig select from mainboard.
I guess MAINBOARD_HAS_DGPU_VGA_INIT is not even needed in this case because VGA_ROM_RUN would be the only option.
- Both onboard (IGD) and discrete GFX (DGPU) and based on some switch change the display dynamically => This is problem at present as RUN_FSP_GOP and VGA_ROM_RUN both are part of choice option hence couldn't able to select both from mainboard. Ideally for this type of mainboard design, we need to have both RUN_FSP_GOP and VGA_ROM_RUN enable in Kconfig and coreboot decide based on switch position if like to call FSP for IGD display or load/execute VGA OpROM for DGPU init. Right now, i'm commenting choice option in my local repo and selecting both Kconfig to make this dynamic display possible.
The choice is a bit obsolete now. Originally, we could not select multiple options because of linking errors. Now, since Patrick's topic:framebuffer_info, we can actually build multiple drivers for grapchics initialization at once.
Maybe it's time to get rid of the choice? If multiple drivers are run, we'd end up with multiple framebuffers. But we could add some more Kconfigs, e.g. "Only initialize primary graphics adapter". If, in your case, the switch disables either GPU, the other would automatically be primary I guess.
(There should still be a choice if we have multiple drivers for a single GPU, though, e.g. libgfxinit vs. the unnecessary FSP/GOP blob).