From 95675d94de91f268f3e68ef7acdd50b91a882a43 Mon Sep 17 00:00:00 2001 From: Nikolai Vyssotski Date: Tue, 9 Feb 2021 13:01:07 -0600 Subject: soc/amd/common/block/graphics/graphics: report GOP frame buffer GOP needs to register the new framebuffer. BUG=b:171234996 BRANCH=Zork Change-Id: I17b6533520b0628df9529d09f70d5fc28339d522 Signed-off-by: Nikolai Vyssotski Reviewed-on: https://review.coreboot.org/c/coreboot/+/49864 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/common/block/graphics/graphics.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/soc/amd/common/block') diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index c2bbff440c..5fc97deafc 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -4,6 +4,8 @@ #include #include #include +#include +#include #define ATIF_FUNCTION_VERIFY_INTERFACE 0x0 struct atif_verify_interface_output { @@ -116,11 +118,27 @@ static const char *graphics_acpi_name(const struct device *dev) return "IGFX"; } +static void graphics_dev_init(struct device *const dev) +{ + if (CONFIG(RUN_FSP_GOP)) { + struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); + + if (res && res->base) + fsp_report_framebuffer_info(res->base); + else + printk(BIOS_ERR, "%s: Unable to find resource for %s\n", + __func__, dev_path(dev)); + } + + /* Initialize PCI device, load/execute BIOS Option ROM */ + pci_dev_init(dev); +} + static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, - .init = pci_dev_init, + .init = graphics_dev_init, .ops_pci = &pci_dev_ops_pci, .write_acpi_tables = pci_rom_write_acpi_tables, .acpi_fill_ssdt = graphics_fill_ssdt, -- cgit v1.2.3