diff options
author | Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com> | 2021-03-11 19:15:03 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2021-03-13 02:44:40 +0000 |
commit | b649d6ac116e0a650f4db93a430686965450eca0 (patch) | |
tree | 3d44635e6f3ec458381643708da5d5f3c42bd766 /src/soc/amd | |
parent | 1ab35a7f50a70b481c9d76ceed507cccfb881f06 (diff) |
soc/amd/common/block/graphics/graphics: GOP: load VBIOS
Load VBIOS in pci set_resources to PCI_VGA_RAM_IMAGE_START (0xc0000)
since pci_dev_init() will not load it in GOP case (VGA_ROM_RUN is not
set). Add Cezanne GFX PID.
BUG=b:171234996
BRANCH=Zork
Change-Id: I4a6fea9b6cd60c862e15ed2ed539869c0f9bd363
Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/common/block/graphics/graphics.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c index 550cde57e1..942a8034af 100644 --- a/src/soc/amd/common/block/graphics/graphics.c +++ b/src/soc/amd/common/block/graphics/graphics.c @@ -7,6 +7,7 @@ #include <console/console.h> #include <fsp/graphics.h> #include <soc/intel/common/vbt.h> +#include <timestamp.h> #define ATIF_FUNCTION_VERIFY_INTERFACE 0x0 struct atif_verify_interface_output { @@ -129,6 +130,25 @@ void *vbt_get(void) return NULL; } +static void graphics_set_resources(struct device *const dev) +{ + struct rom_header *rom, *ram; + + pci_dev_set_resources(dev); + + if (!CONFIG(RUN_FSP_GOP)) + return; + + timestamp_add_now(TS_OPROM_INITIALIZE); + rom = pci_rom_probe(dev); + if (rom == NULL) + return; + ram = pci_rom_load(dev, rom); + if (ram == NULL) + return; + timestamp_add_now(TS_OPROM_COPY_END); +} + static void graphics_dev_init(struct device *const dev) { if (CONFIG(RUN_FSP_GOP)) { @@ -147,7 +167,7 @@ static void graphics_dev_init(struct device *const dev) static const struct device_operations graphics_ops = { .read_resources = pci_dev_read_resources, - .set_resources = pci_dev_set_resources, + .set_resources = graphics_set_resources, .enable_resources = pci_dev_enable_resources, .init = graphics_dev_init, .ops_pci = &pci_dev_ops_pci, @@ -158,6 +178,7 @@ static const struct device_operations graphics_ops = { static const unsigned short pci_device_ids[] = { PCI_DEVICE_ID_ATI_FAM17H_MODEL18H_GPU, + PCI_DEVICE_ID_ATI_FAM19H_MODEL51H_GPU, 0, }; |