Subrata Banik submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
device: Add new Kconfig VGA_ROM_RUN_DEFAULT for mainboard user

Platform can now select VGA_ROM_RUN_DEFAULT Kconfig to perform graphics
initialization for PCI-E based discrete card through VGA OpRom
(SoC or Mainboard user can't select VGA_ROM_RUN directly because
it's part of choice option).

(Note: Some payloads, like SeaBIOS, are also able to run Option ROMs,
so coreboot does not need to enable VGA_ROM_RUN Kconfig)

For payload like depthcharge, create VGA_ROM_RUN_DEFAULT Kconfig
for mainboard to select design with DGPU where OpROM is embedded
inside the DGPU card.

Allow auto selection of VGA_ROM_RUN_DEFAULT from VGA_BIOS Kconfig.

Also NO_GFX_INIT Kconfig to avoid running VGA_ROM_RUN
by default in case SeaBIOS is used.

TEST=Able to get Pre-OS splash screen with AMD Radeon RX 5700 PCI-E
DGPU when mainboard user selects VGA_ROM_RUN_DEFAULT.

Change-Id: Iecb2fcdb105af449bc20ad727759cdef17d5e376
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49016
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M src/device/Kconfig
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/device/Kconfig b/src/device/Kconfig
index a472a6a..bb4e913 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -46,6 +46,12 @@
Selected by mainboards / chipsets whose graphics driver can't or
shouldn't be disabled.

+config VGA_ROM_RUN_DEFAULT
+ def_bool n
+ help
+ Selected by mainboards whose graphics initialization depends on VGA OpROM.
+ coreboot needs to load/execute legacy VGA OpROM in order to initialize GFX.
+
config MAINBOARD_HAS_LIBGFXINIT
def_bool n
help
@@ -54,8 +60,8 @@

choice
prompt "Graphics initialization"
- default NO_GFX_INIT if VGA_BIOS && PAYLOAD_SEABIOS
- default VGA_ROM_RUN if VGA_BIOS
+ default NO_GFX_INIT if VGA_ROM_RUN_DEFAULT && PAYLOAD_SEABIOS
+ default VGA_ROM_RUN if VGA_ROM_RUN_DEFAULT
default MAINBOARD_DO_NATIVE_VGA_INIT
default MAINBOARD_USE_LIBGFXINIT
default RUN_FSP_GOP if INTEL_GMA_HAVE_VBT
@@ -690,6 +696,7 @@
config VGA_BIOS
bool "Add a VGA BIOS image"
depends on ARCH_X86
+ select VGA_ROM_RUN_DEFAULT
help
Select this option if you have a VGA BIOS image that you would
like to add to your ROM.

To view, visit change 49016. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iecb2fcdb105af449bc20ad727759cdef17d5e376
Gerrit-Change-Number: 49016
Gerrit-PatchSet: 8
Gerrit-Owner: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Stefan Reinauer <reinauer@chromium.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Patrick Rudolph <siro@das-labor.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged