diff options
author | Simon Glass <sjg@chromium.org> | 2023-03-10 12:47:12 -0800 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-03-13 13:53:01 +0100 |
commit | 57fa4182241348aff6e8471f17a3d06039a65332 (patch) | |
tree | 663c6d6c4452848636b594dc94d923df828b564c | |
parent | 88753816cf549ea2f6e247585b42b843cbae693a (diff) | |
download | u-boot-57fa4182241348aff6e8471f17a3d06039a65332.tar.gz |
efi: video: Return mode info for app also
The mode info is currently not initialised for the app. Fix this by
returning it from the function.
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | drivers/video/efi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/efi.c b/drivers/video/efi.c index fc37a68b37..0479f20703 100644 --- a/drivers/video/efi.c +++ b/drivers/video/efi.c @@ -56,10 +56,12 @@ static void efi_find_pixel_bits(u32 mask, u8 *pos, u8 *size) * Gets info from the graphics-output protocol * * @vesa: Place to put the mode information + * @infop: Returns a pointer to the mode info * Returns: 0 if OK, -ENOSYS if boot services are not available, -ENOTSUPP if * the protocol is not supported by EFI */ -static int get_mode_info(struct vesa_mode_info *vesa) +static int get_mode_info(struct vesa_mode_info *vesa, + struct efi_gop_mode_info **infop) { efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; struct efi_boot_services *boot = efi_get_boot(); @@ -77,6 +79,7 @@ static int get_mode_info(struct vesa_mode_info *vesa) vesa->phys_base_ptr = mode->fb_base; vesa->x_resolution = mode->info->width; vesa->y_resolution = mode->info->height; + *infop = mode->info; return 0; } @@ -118,7 +121,7 @@ static int save_vesa_mode(struct vesa_mode_info *vesa) int ret; if (IS_ENABLED(CONFIG_EFI_APP)) - ret = get_mode_info(vesa); + ret = get_mode_info(vesa, &info); else ret = get_mode_from_entry(vesa, &info); if (ret) { |