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 <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88015
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Subrata Banik 2025-06-09 23:02:08 +05:30
commit d309a9dfa8

View file

@ -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);