lib: Introduce a new function bmp_load_logo_by_type()

This patch introduces `bmp_load_logo_by_type()` to allow loading a
specific BMP logo from CBFS based on `enum bootsplash_type`.

Now, bmp_load_logo() leverages bmp_load_logo_by_type() with the
system-determined logo type. The new bmp_load_logo_by_type() function
provides a direct interface to load any specified BMP by `enum
bootsplash_type`, which is beneficial for scenarios requiring explicit
logo selection.

BUG=b:423591644
TEST=Able to build and boot google/fatcat. Ensure FW splash screen looks
proper.

Change-Id: I2473f7d48ca2d196ced89d81391cf387627a2f86
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88013
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2025-06-09 21:01:49 +05:30
commit be5609bdaf
2 changed files with 13 additions and 9 deletions

View file

@ -31,6 +31,7 @@ void set_bootsplash(unsigned char *framebuffer, unsigned int x_resolution,
*/
const char *bmp_logo_filename(void);
void *bmp_load_logo(size_t *logo_size);
void *bmp_load_logo_by_type(enum bootsplash_type type, size_t *logo_size);
void bmp_release_logo(void);
/*
* Platform specific callbacks for power-off handling.