summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/common/block/graphics/graphics.c
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@amd.corp-partner.google.com>2023-02-16 09:50:54 -0600
committerFelix Held <felix-coreboot@felixheld.de>2023-02-23 21:48:15 +0000
commitd1fb655d0dbf4feb0117c02bcc4c4817c02118b1 (patch)
treeb585f7a8f33e47c158476260fe4e55592d9e6cb1 /src/soc/amd/common/block/graphics/graphics.c
parent65a444572e6fe5a972d78c6712607924d0b2ccd5 (diff)
downloadcoreboot-d1fb655d0dbf4feb0117c02bcc4c4817c02118b1.tar.gz
coreboot-d1fb655d0dbf4feb0117c02bcc4c4817c02118b1.tar.bz2
coreboot-d1fb655d0dbf4feb0117c02bcc4c4817c02118b1.zip
soc/amd/commmon/gfx: Generalize check for selective GOP init
Rather than explicitly checking for Recovery or Developer mode via vboot, use display_init_required() so that vboot is not required, and other instances where the display is needed pre-OS (such as when applying a critical system update) are covered as well. With this change, SoCs implementing selective GOP init will need to select VBOOT_MUST_REQUEST_DISPLAY in order for display_init_required() to not assert on compilation. BUG=b:255812886 TEST=build/boot skyrim Change-Id: Iac7e06863764a9f21c8a50fc19050cb5a6627df2 Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/73046 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd/common/block/graphics/graphics.c')
-rw-r--r--src/soc/amd/common/block/graphics/graphics.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/soc/amd/common/block/graphics/graphics.c b/src/soc/amd/common/block/graphics/graphics.c
index 70e3758b0840..cc5205310411 100644
--- a/src/soc/amd/common/block/graphics/graphics.c
+++ b/src/soc/amd/common/block/graphics/graphics.c
@@ -4,13 +4,13 @@
#include <acpi/acpigen.h>
#include <amdblocks/vbios_cache.h>
#include <boot/coreboot_tables.h>
+#include <bootmode.h>
#include <bootstate.h>
#include <console/console.h>
#include <device/pci.h>
#include <fmap.h>
#include <fsp/graphics.h>
#include <security/vboot/vbios_cache_hash_tpm.h>
-#include <security/vboot/vboot_common.h>
#include <soc/intel/common/vbt.h>
#include <timestamp.h>
@@ -150,12 +150,11 @@ static void graphics_set_resources(struct device *const dev)
return;
timestamp_add_now(TS_OPROM_INITIALIZE);
- if (CONFIG(USE_SELECTIVE_GOP_INIT) && vbios_cache_is_valid()) {
- if (!vboot_recovery_mode_enabled() && !vboot_developer_mode_enabled()) {
- vbios_load_from_cache();
- timestamp_add_now(TS_OPROM_COPY_END);
- return;
- }
+ if (CONFIG(USE_SELECTIVE_GOP_INIT) && vbios_cache_is_valid() &&
+ !display_init_required()) {
+ vbios_load_from_cache();
+ timestamp_add_now(TS_OPROM_COPY_END);
+ return;
}
rom = pci_rom_probe(dev);
if (rom == NULL)