diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2022-12-01 15:45:51 -0700 |
---|---|---|
committer | Subrata Banik <subratabanik@google.com> | 2023-01-11 13:59:54 +0000 |
commit | 765e5df0dddbb12927dbcc8a8315ed4c99357984 (patch) | |
tree | 571327fd8ebbcb5aec26981ef01848cb97a29883 /src/device | |
parent | ea2dbdba2e5a27d47fb3b7834951cff2e0f40628 (diff) |
drivers/intel/gma: Hook up libgfxinit in romstage
A mainboard port needs to:
- select `CONFIG_MAINBOARD_HAS_EARLY_LIBGFXINIT'
- implement the Ada package `GMA.Mainboard' with a single function
`ports' that returns a list of ports to be probed for displays.
- set the desired `GFX_GMA_DEFAULT_MMIO' IO memory address to use
in romstage (and ramstage) for the graphic device.
BUG=b:252792591
BRANCH=firmware-brya-14505.B
TEST=libgfxinit compiles in romstage.
libgfxinit successfully executes in romstage and ramstage using
the requested MMIO setting on skolas.
Change-Id: I3c2101de10dc5df54fe873e43bbe0f1c4dccff44
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70276
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/Kconfig | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/device/Kconfig b/src/device/Kconfig index 1ff14a6571..e98644e34d 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -4,7 +4,7 @@ menu "Devices" config HAVE_VGA_TEXT_FRAMEBUFFER bool - depends on !NO_GFX_INIT + depends on !(NO_GFX_INIT && NO_EARLY_GFX_INIT) help Selected by graphics drivers that support legacy VGA text mode. @@ -58,6 +58,13 @@ config MAINBOARD_HAS_LIBGFXINIT Selected by mainboards that implement support for `libgfxinit`. Usually this requires a list of ports to be probed for displays. +config MAINBOARD_HAS_EARLY_LIBGFXINIT + def_bool n + help + Selected by mainboards that implement early (cache-as-ram + stage) support of `libgfxinit`. Usually this requires a list + of ports to be probed for displays. + choice prompt "Graphics initialization" default NO_GFX_INIT if VGA_ROM_RUN_DEFAULT && PAYLOAD_SEABIOS @@ -117,6 +124,28 @@ config NO_GFX_INIT endchoice +choice + prompt "Early (romstage) graphics initialization" + default MAINBOARD_USE_EARLY_LIBGFXINIT if MAINBOARD_HAS_EARLY_LIBGFXINIT + default NO_EARLY_GFX_INIT + +config NO_EARLY_GFX_INIT + bool "None" + help + Select this to not perform any graphics initialization at + romstage. + +config MAINBOARD_USE_EARLY_LIBGFXINIT + bool "Use libgfxinit" + depends on MAINBOARD_HAS_EARLY_LIBGFXINIT + select ROMSTAGE_VGA + help + Use the SPARK library `libgfxinit` for the romstage native + graphics initialization. This requires an Ada + toolchain. Graphics at romstage is limited to VGA text mode. + +endchoice + config PRE_GRAPHICS_DELAY_MS int "Graphics initialization delay in ms" default 0 |