Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40676 )
Change subject: soc/amd/picasso: Use common block graphics driver ......................................................................
soc/amd/picasso: Use common block graphics driver
This change selects common block graphics driver for Picasso and also adds PCI ID for Family 17h graphics controller to the graphics driver.
Since the common driver provides .acpi_name() callback for graphics device, soc_acpi_name() no longer needs to provide the ACPI name for graphics device.
BUG=b:153858769
Change-Id: Id3ffcb05d8f8a253a0b27407d52d7907c507cabb Signed-off-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/common/block/graphics/graphics.c M src/soc/amd/picasso/Kconfig M src/soc/amd/picasso/chip.c 3 files changed, 8 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/40676/1
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index b21cf2c..8e14aa7 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -5,6 +5,11 @@ #include <device/pci.h> #include <device/pci_ids.h>
+static const struct *graphics_acpi_name(const struct device *dev) +{ + return "IGFX"; +} + static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, @@ -13,9 +18,11 @@ .ops_pci = &pci_dev_ops_pci, .write_acpi_tables = pci_rom_write_acpi_tables, .acpi_fill_ssdt_generator = pci_rom_ssdt, + .acpi_name = graphics_acpi_name, };
static const unsigned short pci_device_ids[] = { + PCI_DEVICE_ID_AMD_FAM17H_GPU, 0, };
diff --git a/src/soc/amd/picasso/Kconfig b/src/soc/amd/picasso/Kconfig index c7e65fa..3113b27 100644 --- a/src/soc/amd/picasso/Kconfig +++ b/src/soc/amd/picasso/Kconfig @@ -31,6 +31,7 @@ select SOC_AMD_COMMON_BLOCK_ACPIMMIO select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS select SOC_AMD_COMMON_BLOCK_ACPI + select SOC_AMD_COMMON_BLOCK_GRAPHICS select SOC_AMD_COMMON_BLOCK_LPC select SOC_AMD_COMMON_BLOCK_PCI select SOC_AMD_COMMON_BLOCK_HDA diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index 7b3e7fb..4b25b88 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -51,8 +51,6 @@ return NULL;
switch (dev->path.pci.devfn) { - case GFX_DEVFN: - return "IGFX"; case PCIE0_DEVFN: return "PBR4"; case PCIE1_DEVFN: