[PATCH v2 5/7] efi_loader: GOP: Add damage notification on BLT
Alexander Graf
agraf at csgraf.de
Fri Jun 10 00:59:19 CEST 2022
Now that we have a damage tracking API, let's populate damage done by
UEFI payloads when they BLT data onto the screen.
Signed-off-by: Alexander Graf <agraf at csgraf.de>
Reported-by: Da Xue <da at libre.computer>
---
v1 -> v2:
- Remove ifdefs from gop
---
lib/efi_loader/efi_gop.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 2c81859807..ff08e97d93 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -33,6 +33,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;
@@ -244,6 +245,9 @@ static __always_inline efi_status_t gop_blt_int(struct efi_gop *this,
dlineoff += dwidth;
}
+ if (IS_ENABLED(CONFIG_DM_VIDEO))
+ video_damage(gopobj->vdev, dx, dy, width, height);
+
return EFI_SUCCESS;
}
@@ -481,9 +485,9 @@ efi_status_t efi_gop_register(void)
u64 fb_base, fb_size;
void *fb;
efi_status_t ret;
+ struct udevice *vdev = NULL;
#ifdef CONFIG_DM_VIDEO
- struct udevice *vdev;
struct video_priv *priv;
/* We only support a single video output device for now */
@@ -582,6 +586,7 @@ efi_status_t efi_gop_register(void)
gopobj->info.pixels_per_scanline = col;
gopobj->bpix = bpix;
gopobj->fb = fb;
+ gopobj->vdev = vdev;
return EFI_SUCCESS;
}
--
2.32.1 (Apple Git-133)
More information about the U-Boot
mailing list