From e9c47bf99e4fe177c3bdb1d0980fc6763d28ff4f Mon Sep 17 00:00:00 2001 From: Kapil Porwal Date: Mon, 17 Nov 2025 22:11:35 +0530 Subject: [PATCH] drivers/intel/fsp2_0: Add 1-bpp monochrome option for VGA mode 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new Kconfig option, FSP_VGA_MODE12_MONOCHROME, to allow the system to use a 1-bit-per-pixel (1bpp) planar VGA buffer during FSP initialization instead of the standard 4bpp buffer. This is useful in romstage where every byte is critical. When this option is enabled, the FSP is expected to handle the internal replication of the 1bpp data across the other three color planes to render the monochrome image. Key changes: - Introduce FSP_VGA_MODE12_MONOCHROME Kconfig option. - Automatically select FSP_VGA_MODE12 when the monochrome option is used. - Set FSP_VGA_MODE12_BPP to 0x1 when FSP_VGA_MODE12_MONOCHROME is selected. BUG=b:406725440 TEST=Verify VGA text rotation on Google/Felino. Change-Id: Ie77c40025c13e52188439fffedc834c26338bfe3 Signed-off-by: Kapil Porwal Reviewed-on: https://review.coreboot.org/c/coreboot/+/90072 Tested-by: build bot (Jenkins) Reviewed-by: Jérémy Compostella Reviewed-by: Subrata Banik --- src/drivers/intel/fsp2_0/Kconfig | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/drivers/intel/fsp2_0/Kconfig b/src/drivers/intel/fsp2_0/Kconfig index f864c344e7..3309f99907 100644 --- a/src/drivers/intel/fsp2_0/Kconfig +++ b/src/drivers/intel/fsp2_0/Kconfig @@ -507,8 +507,20 @@ config FSP_VGA_MODE12 help Select this if the FSP supports VGA mode 12. +config FSP_VGA_MODE12_MONOCHROME + bool + default n + depends on VGA || ROMSTAGE_VGA + select FSP_VGA_MODE12 + help + Select this if the FSP supports monochrome VGA mode 12. This implies + that FSP can accept 1 bit-per-pixel planar buffer instead of 4 to save + the crucial space. The FSP internally replicates the pixel data to other + 3 planes. + config FSP_VGA_MODE12_BPP hex + default 0x1 if FSP_VGA_MODE12_MONOCHROME default 0x4 if FSP_VGA_MODE12 default 0x0 help