diff options
author | Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com> | 2021-02-09 13:01:07 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-03-08 20:25:22 +0000 |
commit | 95675d94de91f268f3e68ef7acdd50b91a882a43 (patch) | |
tree | 2c29bae47fbeb23486717fde348d8a4d1c44505b /src/soc/amd/common | |
parent | 95059b705500f4a7061bb3e8ea1e2fd01a3abde1 (diff) |
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 <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49864
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd/common')
-rw-r--r-- | src/soc/amd/common/block/graphics/graphics.c | 20 |
1 files changed, 19 insertions, 1 deletions
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 <acpi/acpigen.h> #include <device/pci.h> #include <device/pci_ids.h> +#include <console/console.h> +#include <fsp/graphics.h> #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, |