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>
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c
index 550cde5..942a803 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 @@
 	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 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 unsigned short pci_device_ids[] = {
 	PCI_DEVICE_ID_ATI_FAM17H_MODEL18H_GPU,
+	PCI_DEVICE_ID_ATI_FAM19H_MODEL51H_GPU,
 	0,
 };