lib: Correct logo bottom margin handling for all panel orientations
This patch fixes a bug in load_and_render_logo_to_framebuffer where the logo_bottom_margin was only correctly applied to the NORMAL orientations. For other orientations, the margin was incorrectly applied, resulting in the logo not being positioned as expected. TEST=Able to see logo footer in alignment with the logo center while booting google/felino. Change-Id: Ia886ef5305166b1307fcf5b0acd12582b4b6ad80 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/88889 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
parent
9999a4aebb
commit
51a8e238b0
1 changed files with 13 additions and 4 deletions
|
|
@ -651,11 +651,20 @@ static int load_and_render_logo_to_framebuffer(
|
|||
config->vertical_resolution, logo_width, logo_height, halignment, valignment);
|
||||
|
||||
if (logo_bottom_margin) {
|
||||
if (config->panel_orientation == LB_FB_ORIENTATION_BOTTOM_UP ||
|
||||
config->panel_orientation == LB_FB_ORIENTATION_NORMAL)
|
||||
logo_coords.y -= logo_bottom_margin;
|
||||
else
|
||||
switch (config->panel_orientation) {
|
||||
case LB_FB_ORIENTATION_RIGHT_UP:
|
||||
logo_coords.x = logo_bottom_margin;
|
||||
break;
|
||||
case LB_FB_ORIENTATION_LEFT_UP:
|
||||
logo_coords.x -= logo_bottom_margin;
|
||||
break;
|
||||
case LB_FB_ORIENTATION_BOTTOM_UP:
|
||||
logo_coords.y = logo_bottom_margin;
|
||||
break;
|
||||
default: /* LB_FB_ORIENTATION_NORMAL (default) */
|
||||
logo_coords.y -= logo_bottom_margin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
copy_logo_to_framebuffer(config->framebuffer_base, config->bytes_per_scanline, blt_buffer,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue