lib/vga_gfx: Fix left-up and right-up orientations

The left-up and right-up orientations were swapped. Fix it to align
with boot logo and depthcharge screen.

BUG=b:406725440
TEST=Verify all 4 panel orientation on Google/Felino.

Change-Id: Ib0d08d4b2aa697129d854c15e081c7765e542060
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Kapil Porwal 2025-10-30 21:37:59 +05:30 committed by Matt DeVillier
commit 641eeca835

View file

@ -37,7 +37,7 @@ static void set_pixel(int x_logical, int y_logical, int value)
* The physical buffer is always buffer_width x buffer_height.
*/
switch (current_orientation) {
case LB_FB_ORIENTATION_LEFT_UP:
case LB_FB_ORIENTATION_RIGHT_UP:
/* Logical (x,y) -> Physical (buffer_width-1-y, x) */
buffer_x = buffer_width - 1 - y_logical;
buffer_y = x_logical;
@ -50,7 +50,7 @@ static void set_pixel(int x_logical, int y_logical, int value)
buffer_x = buffer_width - 1 - x_logical;
buffer_y = buffer_height - 1 - y_logical;
break;
case LB_FB_ORIENTATION_RIGHT_UP:
case LB_FB_ORIENTATION_LEFT_UP:
/* Logical (x,y) -> Physical (y, buffer_height-1-x) */
buffer_x = y_logical;
buffer_y = buffer_height - 1 - x_logical;