summaryrefslogtreecommitdiff
path: root/src/soc/amd/picasso/graphics.c
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-03-09 16:29:46 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-03-30 20:13:15 +0000
commit924aff9e226a1ef2e6456230cf1b466436d91aeb (patch)
treed3b11c1df18540e8f7f84dcee49293e4c19b740d /src/soc/amd/picasso/graphics.c
parentd8707e7e0f10f8ff265a0cd515d888333bf852c5 (diff)
soc/amd/picasso/graphics: refactor map_oprom_vendev_rev
Refactor map_oprom_vendev_rev as a preparation to also remap the revision ID in the RAVEN2_VBIOS_VID_DID case. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I3b81a9464ed49672889fcb767920154fe6efdfcc Reviewed-on: https://review.coreboot.org/c/coreboot/+/74044 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/picasso/graphics.c')
-rw-r--r--src/soc/amd/picasso/graphics.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/soc/amd/picasso/graphics.c b/src/soc/amd/picasso/graphics.c
index 298e177881..f0f5bd4e4f 100644
--- a/src/soc/amd/picasso/graphics.c
+++ b/src/soc/amd/picasso/graphics.c
@@ -8,16 +8,15 @@
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;
+ if (*vendev == PICASSO_VBIOS_VID_DID) {
+ /* 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;
+ }
}
}