diff options
author | Tom Rini <trini@konsulko.com> | 2023-11-15 14:15:21 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-11-15 14:15:21 -0500 |
commit | 169c3cc49e40758956ee6c310f7f59a6443826a1 (patch) | |
tree | 469779cc9196adce361abe56c2ce27a6563e98ce /lib/efi_loader/efi_gop.c | |
parent | 92b27528d777ce85362af45e7d2974a6c856219b (diff) | |
parent | 0d4d9f94c555577f78cddc372c307465fc92413e (diff) |
Merge tag 'dm-pull-15nov23' of https://source.denx.de/u-boot/custodians/u-boot-dm
patman correct import of u_boot_pylib
correct long-standing EFI framebuffer bug
minor test refactor
Diffstat (limited to 'lib/efi_loader/efi_gop.c')
-rw-r--r-- | lib/efi_loader/efi_gop.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 778b693f983..a09db31eb46 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -10,6 +10,7 @@ #include <efi_loader.h> #include <log.h> #include <malloc.h> +#include <mapmem.h> #include <video.h> #include <asm/global_data.h> @@ -467,10 +468,10 @@ efi_status_t efi_gop_register(void) struct efi_gop_obj *gopobj; u32 bpix, format, col, row; u64 fb_base, fb_size; - void *fb; efi_status_t ret; struct udevice *vdev; struct video_priv *priv; + struct video_uc_plat *plat; /* We only support a single video output device for now */ if (uclass_first_device_err(UCLASS_VIDEO, &vdev)) { @@ -483,9 +484,10 @@ efi_status_t efi_gop_register(void) format = priv->format; col = video_get_xsize(vdev); row = video_get_ysize(vdev); - fb_base = (uintptr_t)priv->fb; - fb_size = priv->fb_size; - fb = priv->fb; + + plat = dev_get_uclass_plat(vdev); + fb_base = IS_ENABLED(CONFIG_VIDEO_COPY) ? plat->copy_base : plat->base; + fb_size = plat->size; switch (bpix) { case VIDEO_BPP16: @@ -547,7 +549,7 @@ efi_status_t efi_gop_register(void) } gopobj->info.pixels_per_scanline = col; gopobj->bpix = bpix; - gopobj->fb = fb; + gopobj->fb = map_sysmem(fb_base, fb_size); return EFI_SUCCESS; } |