diff options
| author | Tom Rini <trini@konsulko.com> | 2025-05-01 10:49:07 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2025-05-01 10:49:07 -0600 |
| commit | ad60d979289650659cc6e158228d2049636215b0 (patch) | |
| tree | 8348659e370dd6c9f9f059d52ee7361d60bcec7c /lib | |
| parent | 152fa1b7fd6b43c727e322aec7a870a33865a248 (diff) | |
| parent | 2a61f40d4a9f7eacce67a80ce79f916996c4196d (diff) | |
Merge tag 'dm-pull-mayday' of git://git.denx.de/u-boot-dm
Support for calculating video damage
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/efi_loader/efi_gop.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c index 4593975be5a..3abb47d610e 100644 --- a/lib/efi_loader/efi_gop.c +++ b/lib/efi_loader/efi_gop.c @@ -26,6 +26,7 @@ static const efi_guid_t efi_gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; * @ops: graphical output protocol interface * @info: graphical output mode information * @mode: graphical output mode + * @vdev: backing video device * @bpix: bits per pixel * @fb: frame buffer */ @@ -34,6 +35,7 @@ struct efi_gop_obj { struct efi_gop ops; struct efi_gop_mode_info info; struct efi_gop_mode mode; + struct udevice *vdev; /* Fields we only have access to during init */ u32 bpix; void *fb; @@ -122,6 +124,7 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, u32 *fb32 = gopobj->fb; u16 *fb16 = gopobj->fb; struct efi_gop_pixel *buffer = __builtin_assume_aligned(bufferp, 4); + bool blt_to_video = (operation != EFI_BLT_VIDEO_TO_BLT_BUFFER); if (delta) { /* Check for 4 byte alignment */ @@ -245,6 +248,9 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this, dlineoff += dwidth; } + if (blt_to_video) + video_damage(gopobj->vdev, dx, dy, width, height); + return EFI_SUCCESS; } @@ -551,6 +557,7 @@ efi_status_t efi_gop_register(void) gopobj->info.pixels_per_scanline = col; gopobj->bpix = bpix; gopobj->fb = map_sysmem(fb_base, fb_size); + gopobj->vdev = vdev; return EFI_SUCCESS; } |
