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>
This commit is contained in:
Patrick Rudolph 2025-02-06 11:21:08 +01:00 committed by Felix Held
commit 33f6375ca5
3 changed files with 16 additions and 4 deletions

View file

@ -35,3 +35,11 @@ config SOC_AMD_COMMON_BLOCK_GRAPHICS_ACP
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.

View file

@ -148,10 +148,13 @@ static const char *graphics_acpi_name(const struct device *dev)
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)

View file

@ -47,7 +47,8 @@ config SOC_AMD_GLINDA
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