[PATCH] efi: video: fix mode info in payload mode
Heinrich Schuchardt
xypron.glpk at gmx.de
Tue Nov 4 10:34:51 CET 2025
On 10/27/25 21:56, Ben Wolsieffer wrote:
> Currently, the EFI framebuffer is non-functional in payload mode. It
> always reports: "No video mode configured in EFI!"
Hello Ben,
thanks for reporting the issue that you experience.
How can it be reproduced?
>
> 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;
The definition of struct efi_entry_gopmode should be corrected instead
of adding this conversion.
The logic in save_vesa_mode() which calls get_mode_from_entry() is
completely broken:
The element info is an array. Without considering which mode is set up
you will not know which entry of the array should be used. To get
information about the current mode, use QueryMode(), please.
Best regards
Heinrich
>
> return 0;
> }
More information about the U-Boot
mailing list