@@ -1399,6 +1399,7 @@ struct efi_hii_config_access_protocol {
#define EFI_GOT_RGBA8 0
#define EFI_GOT_BGRA8 1
#define EFI_GOT_BITMASK 2
+#define EFI_GOT_BLTONLY 3
struct efi_gop_mode_info {
u32 version;
@@ -471,6 +471,7 @@ efi_status_t efi_gop_register(void)
struct udevice *vdev;
struct video_priv *priv;
struct video_uc_plat *plat;
+ struct video_ops *ops;
/* We only support a single video output device for now */
if (uclass_first_device_err(UCLASS_VIDEO, &vdev)) {
@@ -485,6 +486,7 @@ efi_status_t efi_gop_register(void)
row = video_get_ysize(vdev);
plat = dev_get_uclass_plat(vdev);
+ ops = video_get_ops(vdev);
fb_base = IS_ENABLED(CONFIG_VIDEO_COPY) ? plat->copy_base : plat->base;
fb_size = plat->size;
@@ -529,7 +531,11 @@ efi_status_t efi_gop_register(void)
gopobj->info.version = 0;
gopobj->info.width = col;
gopobj->info.height = row;
- if (bpix == VIDEO_BPP32)
+
+ if (ops && ops->video_sync) {
+ /* Applications can't really use it as framebuffer */
+ gopobj->info.pixel_format = EFI_GOT_BLTONLY;
+ } else if (bpix == VIDEO_BPP32)
{
if (format == VIDEO_X2R10G10B10) {
gopobj->info.pixel_format = EFI_GOT_BITMASK;
If a video device has a video_sync hook, it means some software intervene is required to scanout framebuffer up on change. That means EFI application can't just use it as raw framebuffer, it should call BLT operation to let U-Boot help with scanout. Mark pixel format as BLTONLY as per UEFI spec to reflect this nature. Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com> --- v2: - Remove an unused variable --- include/efi_api.h | 1 + lib/efi_loader/efi_gop.c | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-)