Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/86300?usp=email )
Change subject: soc/amd/common/block/graphics: Support non VGA IGDs ......................................................................
soc/amd/common/block/graphics: Support non VGA IGDs
On glinda the IGD is no longer VGA compatible. It doesn't advertise itself as a VGA compatible devices and doesn't decode the legacy VGA ranges 0x3C0-0x3CF, 0x3D4.
Introduce a new Kconfig and select it where necessary to keep existing behaviour on older SoC while fixing FSP GOP init on glinda. The VBIOS will get loaded into the D-segment instead the C-segment, which is typically used by VGA.
TEST: FSP GOP on amd/birman+ is able to find the VBIOS. amdgpu driver still doesn't work as the VFCT table isn't generated on amd/glinda.
Change-Id: I6ab28aab74f3169d45d7d852a37ddfcfc75b7c88 Signed-off-by: Patrick Rudolph patrick.rudolph@9elements.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/86300 Reviewed-by: Felix Held felix-coreboot@felixheld.de Reviewed-by: Ana Carolina Cabral ana.cpmelo95@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/amd/common/block/graphics/Kconfig M src/soc/amd/common/block/graphics/graphics.c M src/soc/amd/glinda/Kconfig 3 files changed, 16 insertions(+), 4 deletions(-)
Approvals: Felix Held: Looks good to me, approved build bot (Jenkins): Verified Ana Carolina Cabral: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/common/block/graphics/Kconfig b/src/soc/amd/common/block/graphics/Kconfig index 3b2eaed..b7401fb 100644 --- a/src/soc/amd/common/block/graphics/Kconfig +++ b/src/soc/amd/common/block/graphics/Kconfig @@ -35,3 +35,11 @@ help Select this option to provide Audio CoProcessor ACPI device for pre-Ryzen APUs for use by custom Windows drivers. + +config SOC_AMD_COMMON_BLOCK_GRAPHICS_NO_VGA + bool + depends on SOC_AMD_COMMON_BLOCK_GRAPHICS + help + Select this option when the IGD is not VGA compatible. On newer platforms the IGD + advertises itself as a Display device, but not as a VGA Display controller. + The IGD does not decode the legacy I/O ranges 0x3C0-0x3CF, 0x3D4. diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index f80484d..369fd85 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -148,10 +148,13 @@
void *vbt_get(void) { - if (CONFIG(RUN_FSP_GOP)) - return (void *)(uintptr_t)PCI_VGA_RAM_IMAGE_START; + if (!CONFIG(RUN_FSP_GOP)) + return NULL;
- return NULL; + if (CONFIG(SOC_AMD_COMMON_BLOCK_GRAPHICS_NO_VGA)) + return (void *)(uintptr_t)PCI_RAM_IMAGE_START; + + return (void *)(uintptr_t)PCI_VGA_RAM_IMAGE_START; }
static void graphics_set_resources(struct device *const dev) diff --git a/src/soc/amd/glinda/Kconfig b/src/soc/amd/glinda/Kconfig index aa8c85e..39fb785 100644 --- a/src/soc/amd/glinda/Kconfig +++ b/src/soc/amd/glinda/Kconfig @@ -47,7 +47,8 @@ select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_MULTI_PCI_SEGMENT select SOC_AMD_COMMON_BLOCK_ESPI_EXTENDED_DECODE_RANGES # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_GPP_CLK - select SOC_AMD_COMMON_BLOCK_GRAPHICS # TODO: Check if this is still correct + select SOC_AMD_COMMON_BLOCK_GRAPHICS + select SOC_AMD_COMMON_BLOCK_GRAPHICS_NO_VGA select SOC_AMD_COMMON_BLOCK_HAS_ESPI # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_HAS_ESPI_ALERT_ENABLE # TODO: Check if this is still correct select SOC_AMD_COMMON_BLOCK_I2C # TODO: Check if this is still correct