drivers/intel: Add horizontal logo alignment for splash screen

This commit adds horizontal alignment support for splash screen
logos into the existing helper function `calculate_logo_coordinates()`.
Updated helper function determines the X-coordinate for
logo placement based on specified horizontal alignment (left, right,
or center).

The `soc_load_logo_by_coreboot()` function is updated to utilize this
helper for footer logo placement when the panel orientation is
rotated (`LB_FB_ORIENTATION_RIGHT_UP`, `LB_FB_ORIENTATION_LEFT_UP`,
or `LB_FB_ORIENTATION_BOTTOM_UP`).

A new enum, `fw_splash_horizontal_alignment`, is defined in
`intelblocks/cfg.h` to explicitly represent these horizontal alignment
options, complete with descriptive comments and ASCII art.

This enhancement provides greater flexibility in positioning splash
screen elements, especially useful for rotated displays (for the footer
firmware splash screen).

BUG=b:423591644
TEST=Able to rotate the firmware splash screen (including footer logo)
while using portrait panel.

Change-Id: I23ae6d06e1df9cad1b2907a5c02b619dc831d468
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88030
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Subrata Banik 2025-06-10 19:39:22 +05:30
commit dfeaead9f2
2 changed files with 75 additions and 7 deletions

View file

@ -83,6 +83,36 @@ enum fw_splash_vertical_alignment {
FW_SPLASH_VALIGNMENT_MIDDLE = 3,
};
enum fw_splash_horizontal_alignment {
/*
* The splash image is centered horizontally `(X-axis - logo_width)/2` on the screen.
* The center of the [LOGO] aligns with the horizontal center of the screen.
*
* +-----------------+
* | [LOGO] |
* +-----------------+
*/
FW_SPLASH_HALIGNMENT_CENTER = 0,
/*
* The splash image is aligned to the left edge of the screen.
*
* +-----------------+
* |[LOGO] |
* +-----------------+
*/
FW_SPLASH_HALIGNMENT_LEFT = 1,
/*
* The splash image is aligned to the right edge of the screen.
*
* +-----------------+
* | [LOGO]|
* +-----------------+
*/
FW_SPLASH_HALIGNMENT_RIGHT = 2,
};
/*
* This structure will hold data required by common blocks.
* These are soc specific configurations which will be filled by soc.