[PATCH] efi: video: fix mode info in payload mode

Ben Wolsieffer ben.wolsieffer at hefring.com
Mon Oct 27 21:56:27 CET 2025


Currently, the EFI framebuffer is non-functional in payload mode. It
always reports: "No video mode configured in EFI!"

This is caused by a copy-paste error that replaced
"struct efi_entry_gopmode" with "struct efi_gop_mode".

Fix the type and add a cast to avoid a warning because the "info" field
is declared as an anonymous struct rather than
"struct efi_gop_mode_info" (see the comment in efi.h).

Fixes: 88753816cf54 ("efi: video: Move payload code into a function")
Signed-off-by: Ben Wolsieffer <ben.wolsieffer at hefring.com>
---
 drivers/video/efi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/video/efi.c b/drivers/video/efi.c
index 78d123fad4be..60df4334f1ed 100644
--- a/drivers/video/efi.c
+++ b/drivers/video/efi.c
@@ -104,7 +104,7 @@ static int get_mode_info(struct vesa_mode_info *vesa, u64 *fbp,
 static int get_mode_from_entry(struct vesa_mode_info *vesa, u64 *fbp,
 			       struct efi_gop_mode_info **infop)
 {
-	struct efi_gop_mode *mode;
+	struct efi_entry_gopmode *mode;
 	int size;
 	int ret;
 
@@ -117,7 +117,7 @@ static int get_mode_from_entry(struct vesa_mode_info *vesa, u64 *fbp,
 	*fbp = mode->fb_base;
 	vesa->x_resolution = mode->info->width;
 	vesa->y_resolution = mode->info->height;
-	*infop = mode->info;
+	*infop = (struct efi_gop_mode_info *)mode->info;
 
 	return 0;
 }
-- 
2.51.1



More information about the U-Boot mailing list