soc/intel/pantherlake/romstage: Configure VGA mode 12 monochrome buffer

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 <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90073
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
This commit is contained in:
Kapil Porwal 2025-11-17 22:29:13 +05:30 committed by Matt DeVillier
commit e05492cfb4
2 changed files with 3 additions and 0 deletions

View file

@ -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,

View file

@ -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_ */