From e05492cfb4da46c4079b45ee0097e83180a5123d Mon Sep 17 00:00:00 2001 From: Kapil Porwal Date: Mon, 17 Nov 2025 22:29:13 +0530 Subject: [PATCH] soc/intel/pantherlake/romstage: Configure VGA mode 12 monochrome buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit implements support for the FSP_VGA_MODE12_MONOCHROME Kconfig option within the Panther Lake romstage code. By checking for the CONFIG_FSP_VGA_MODE12_MONOCHROME option, we set the corresponding VGA_INIT_CONTROL_MODE12_MONOCHROME bit in the FSP_M_CONFIG structure. This ensures that when a 1-bit-per-pixel framebuffer is used, the Intel FSP is correctly informed to replicate the data across the remaining color planes for display, saving 75% of framebuffer memory in romstage. Key changes: - Define the new VGA_INIT_CONTROL_MODE12_MONOCHROME control bit. - Conditionally set this control bit in setup_vga_mode12_params() when CONFIG_FSP_VGA_MODE12_MONOCHROME is enabled. BUG=b:406725440 TEST=Verify VGA text rotation on Google/Felino. Change-Id: I1dec24bb7ed44ca07babe0aa6886a50952d3faa2 Signed-off-by: Kapil Porwal Reviewed-on: https://review.coreboot.org/c/coreboot/+/90073 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Jérémy Compostella --- src/soc/intel/pantherlake/romstage/ux.c | 2 ++ src/soc/intel/pantherlake/romstage/ux.h | 1 + 2 files changed, 3 insertions(+) diff --git a/src/soc/intel/pantherlake/romstage/ux.c b/src/soc/intel/pantherlake/romstage/ux.c index 4e346f439f..e0a84257dc 100644 --- a/src/soc/intel/pantherlake/romstage/ux.c +++ b/src/soc/intel/pantherlake/romstage/ux.c @@ -46,6 +46,8 @@ static void setup_vga_mode12_params(FSP_M_CONFIG *m_cfg, enum ux_locale_msg id) m_cfg->LogoXPosition = (VGA12_WIDTH - img_width) / 2; m_cfg->LogoYPosition = (VGA12_HEIGHT - img_height) / 2; m_cfg->VgaInitControl |= VGA_INIT_CONTROL_MODE12; + if (CONFIG(FSP_VGA_MODE12_MONOCHROME)) + m_cfg->VgaInitControl |= VGA_INIT_CONTROL_MODE12_MONOCHROME; } static bool ux_inform_user_of_operation(const char *name, enum ux_locale_msg id, diff --git a/src/soc/intel/pantherlake/romstage/ux.h b/src/soc/intel/pantherlake/romstage/ux.h index abdaa86eec..6359b5ea5e 100644 --- a/src/soc/intel/pantherlake/romstage/ux.h +++ b/src/soc/intel/pantherlake/romstage/ux.h @@ -12,5 +12,6 @@ bool ux_inform_user_of_poweroff_operation(const char *name, FSPM_UPD *mupd); #define VGA_INIT_CONTROL_ENABLE BIT(0) #define VGA_INIT_CONTROL_MODE12 BIT(1) #define VGA_INIT_DISABLE_ANIMATION BIT(4) +#define VGA_INIT_CONTROL_MODE12_MONOCHROME BIT(5) #endif /* _SOC_INTEL_PANTHERLAKE_ROMSTAGE_UX_H_ */