From 97f92d5c698b48d97e65ae12c561c778ba625ba5 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Sun, 22 Jun 2025 18:50:17 +0530 Subject: [PATCH] drivers/intel: Add support for configurable footer logo bottom margin Introduces logo_bottom_margin to soc_intel_common_config to allow adjusting the vertical (or horizontal, based on orientation) offset of the footer logo from the screen edge. This provides flexibility for OEM branding placement. BUG=b:423591644 TEST=Able to show OEM splash screen on google/fatcat. Change-Id: Ie3942d9eee07091286118ac488d1cc85ecc96c4c Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/88163 Tested-by: build bot (Jenkins) Reviewed-by: Kapil Porwal --- src/drivers/intel/fsp2_0/cb_logo.c | 9 +++++++++ src/soc/intel/common/block/include/intelblocks/cfg.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/drivers/intel/fsp2_0/cb_logo.c b/src/drivers/intel/fsp2_0/cb_logo.c index d86e9e3ff0..d533806656 100644 --- a/src/drivers/intel/fsp2_0/cb_logo.c +++ b/src/drivers/intel/fsp2_0/cb_logo.c @@ -185,6 +185,15 @@ static int render_logo_to_framebuffer(uintptr_t framebuffer_base, uint32_t bytes logo_coords = calculate_logo_coordinates(horizontal_resolution, vertical_resolution, logo_width, logo_height, valignment, halignment); + /* Adjust the logo axis for rendering footer bootsplash if any override is available */ + if (logo_type == BOOTSPLASH_FOOTER && config->logo_bottom_margin) { + if (config->panel_orientation == LB_FB_ORIENTATION_BOTTOM_UP || + config->panel_orientation == LB_FB_ORIENTATION_NORMAL) + logo_coords.y -= config->logo_bottom_margin; + else + logo_coords.x -= config->logo_bottom_margin; + } + copy_logo_to_framebuffer(framebuffer_base, bytes_per_scanline, blt_buffer_addr, logo_width, logo_height, logo_coords.x, logo_coords.y); diff --git a/src/soc/intel/common/block/include/intelblocks/cfg.h b/src/soc/intel/common/block/include/intelblocks/cfg.h index ee75dcfc48..8aac699525 100644 --- a/src/soc/intel/common/block/include/intelblocks/cfg.h +++ b/src/soc/intel/common/block/include/intelblocks/cfg.h @@ -127,6 +127,8 @@ struct soc_intel_common_config { struct mmc_dll_params emmc_dll; enum lb_fb_orientation panel_orientation; enum fw_splash_vertical_alignment logo_valignment; + /* Implies spacing from an edge for rendering footer logo */ + uint8_t logo_bottom_margin; }; /* This function to retrieve soc config structure required by common code */