From 641eeca835eb69e3c4eb1df61fa6f1b4ab46ae7a Mon Sep 17 00:00:00 2001 From: Kapil Porwal Date: Thu, 30 Oct 2025 21:37:59 +0530 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/89834 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik --- src/lib/vga_gfx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/vga_gfx.c b/src/lib/vga_gfx.c index 9badc1bf8f..a4d8f62ef4 100644 --- a/src/lib/vga_gfx.c +++ b/src/lib/vga_gfx.c @@ -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;