lib: Rename fill_lb_framebuffer to get_lb_framebuffer

Rename `fill_lb_framebuffer` to `get_lb_framebuffer` to better
reflect that it returns framebuffer information.

The new `get_lb_framebuffer` returns a constant pointer to the
framebuffer structure instead of filling a provided structure.
This simplifies the API and avoids an unnecessary memory copy.

The file `edid_fill_fb.c` is renamed to `framebuffer_info.c`
to better match the function it now contains.

Call sites in `coreboot_table.c` and `render_bmp.c` are
updated to use the new API.

TEST=emerge-tanjiro coreboot; check the FW logo is correctly drawn.
BUG=b:319511268

Change-Id: I8d7b20a0524b6bc9fff9e6461fa0c253345df790
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90725
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Yidi Lin 2026-01-12 15:01:12 +08:00
commit 1d2b399fd7
5 changed files with 16 additions and 19 deletions

View file

@ -689,16 +689,14 @@ void render_logo_to_framebuffer(struct logo_config *config)
if (config->framebuffer_base == 0) {
/* Try to load from already populated framebuffer information */
struct lb_framebuffer framebuffer;
memset(&framebuffer, 0, sizeof(struct lb_framebuffer));
fill_lb_framebuffer(&framebuffer);
const struct lb_framebuffer *fb = get_lb_framebuffer();
/* Exit if framebuffer is still not available */
if (framebuffer.physical_address == 0)
if (!fb)
return;
config->framebuffer_base = framebuffer.physical_address;
config->horizontal_resolution = framebuffer.x_resolution;
config->vertical_resolution = framebuffer.y_resolution;
config->bytes_per_scanline = framebuffer.bytes_per_line;
config->framebuffer_base = fb->physical_address;
config->horizontal_resolution = fb->x_resolution;
config->vertical_resolution = fb->y_resolution;
config->bytes_per_scanline = fb->bytes_per_line;
}
/*