From d309a9dfa8bb55e596e115fc319c75cb47372e4a Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 9 Jun 2025 23:02:08 +0530 Subject: [PATCH] drivers/intel/fsp2_0: Suppress OEM footer in low-battery mode This patch modifies the low-battery shutdown logic to bail out early when the system is in a low-power state. This prevents the display of the OEM footer logo, ensuring power conservation and avoiding unnecessary rendering alongside the low-battery icon. BUG=b:423591644 TEST=Boot platform with `CONFIG(USE_COREBOOT_FOR_BMP_RENDERING)` and low battery. Verify splash appears before shutdown w/o OEM footer logo. Change-Id: Ie9a23c0fe9d6b7d314cf4bbe8a8a90eb5689568e Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/88015 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/drivers/intel/fsp2_0/cb_logo.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/drivers/intel/fsp2_0/cb_logo.c b/src/drivers/intel/fsp2_0/cb_logo.c index e132432401..3bf07790bc 100644 --- a/src/drivers/intel/fsp2_0/cb_logo.c +++ b/src/drivers/intel/fsp2_0/cb_logo.c @@ -179,6 +179,13 @@ void soc_load_logo_by_coreboot(void) copy_logo_to_framebuffer(framebuffer_bar, bytes_per_scanline, blt_buffer_addr, logo_width, logo_height, logo_coords.x, logo_coords.y); + /* + * If the device is in low-battery mode and the low-battery splash screen is being + * displayed, prevent further operation and bail out early. + */ + if (platform_is_low_battery_shutdown_needed()) + return; + if (CONFIG(SPLASH_SCREEN_FOOTER)) { bmp_release_logo(); logo_ptr = (uintptr_t)bmp_load_logo_by_type(BOOTSPLASH_FOOTER, &logo_ptr_size);