summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/device/pci_rom.c2
-rw-r--r--src/soc/amd/common/block/graphics/graphics.c23
2 files changed, 23 insertions, 2 deletions
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 94452433fc..663895c2ce 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -178,7 +178,7 @@ static struct rom_header *check_initialized(const struct device *dev)
struct rom_header *run_rom;
struct pci_data *rom_data;
- if (!CONFIG(VGA_ROM_RUN))
+ if (!CONFIG(VGA_ROM_RUN) && !CONFIG(RUN_FSP_GOP))
return NULL;
run_rom = (struct rom_header *)(uintptr_t)PCI_VGA_RAM_IMAGE_START;
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,
};