From 86ba0d73f34185533e5e2d4258aa3bf3dba40ed4 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Wed, 5 Feb 2020 16:46:30 -0700 Subject: soc/amd/picasso/graphics: implement map_oprom_vendev_rev Picasso, Dali, and Pollock iGPU share the same PCI device ID, but need different video BIOSes. This checks the vendor & device IDs along with the revision and selects the correct video BIOS to use. Also add the second VGA BIOS for Raven2-based SoCs and change all VGA BIOS IDs to the format including the revision number. Since SeaBIOS still expects the CBFS file name without the revision ID, it won't find the VBIOS any more. As a temporary workaround add the VBIOS for the silicon it will run on as VGA_BIOS_DGPU_*. Change-Id: I8f48ecc3fbffddd21d1f830fbee26a09ac351e1c Signed-off-by: Martin Roth Signed-off-by: Felix Held Reviewed-on: https://chromium-review.googlesource.com/2040455 Reviewed-by: Raul E Rangel Reviewed-by: Matt Papageorge Reviewed-by: Justin Frodsham Reviewed-on: https://review.coreboot.org/c/coreboot/+/41562 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/amd/picasso/graphics.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/soc/amd/picasso/graphics.c (limited to 'src/soc/amd/picasso/graphics.c') diff --git a/src/soc/amd/picasso/graphics.c b/src/soc/amd/picasso/graphics.c new file mode 100644 index 0000000000..047559cbf3 --- /dev/null +++ b/src/soc/amd/picasso/graphics.c @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include +#include + +void map_oprom_vendev_rev(u32 *vendev, u8 *rev) +{ + if (*vendev != PICASSO_VBIOS_VID_DID) + return; + + /* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */ + if (soc_is_raven2()) { + printk(BIOS_NOTICE, "Using RV2 VBIOS.\n"); + *vendev = RAVEN2_VBIOS_VID_DID; + *rev = RAVEN2_VBIOS_REV; + } else { + printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n"); + *rev = PICASSO_VBIOS_REV; + } +} -- cgit v1.2.3