]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: coreboot: Enable VIDEO_COPY
authorSimon Glass <sjg@chromium.org>
Wed, 20 Sep 2023 03:00:11 +0000 (21:00 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 21 Sep 2023 22:05:40 +0000 (06:05 +0800)
At least on modern machines the write-back mechanism for the frame buffer
is quite slow when scrolling, since it must read the entire frame buffer
and write it back.

Enable the VIDEO_COPY feature to resolve this problem.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/dts/coreboot.dts
configs/coreboot64_defconfig
configs/coreboot_defconfig
drivers/video/coreboot.c

index f9ff5346a79b1329741d12add2fd2d0bfdd44916..0eb31cae42c10554fac21c1a211648559ea7fbcf 100644 (file)
@@ -42,6 +42,7 @@
        };
 
        coreboot-fb {
+               bootph-some-ram;
                compatible = "coreboot-fb";
        };
 };
index dc3548aa736c53f8c8d904b56eb16a7a014f7128..555d281ef3cf5c518b074e55c1c2d1373c8c5c6f 100644 (file)
@@ -59,6 +59,7 @@ CONFIG_NVME_PCI=y
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_SOUND=y
 CONFIG_SOUND_I8254=y
+CONFIG_VIDEO_COPY=y
 CONFIG_CONSOLE_SCROLL_LINES=5
 CONFIG_SPL_ACPI=y
 CONFIG_CMD_DHRYSTONE=y
index 630eb9aa384c13cbd58af8db517513536f76e044..edc38f1f5923c3bfc5f08bc5779b1befa4f0e3f2 100644 (file)
@@ -53,6 +53,7 @@ CONFIG_NVME_PCI=y
 CONFIG_SYS_NS16550_MEM32=y
 CONFIG_SOUND=y
 CONFIG_SOUND_I8254=y
+CONFIG_VIDEO_COPY=y
 CONFIG_CONSOLE_SCROLL_LINES=5
 CONFIG_CMD_DHRYSTONE=y
 # CONFIG_GZIP is not set
index c586475e41edf8b3ed0079e50fb102ed01e5b3e2..5b718ae3e5a5e409486b756348cabde4b9c57ed8 100644 (file)
@@ -73,6 +73,17 @@ err:
        return ret;
 }
 
+static int coreboot_video_bind(struct udevice *dev)
+{
+       struct video_uc_plat *uc_plat = dev_get_uclass_plat(dev);
+
+       /* Set the maximum supported resolution */
+       uc_plat->size = 4096 * 2160 * 4;
+       log_debug("%s: Frame buffer size %x\n", __func__, uc_plat->size);
+
+       return 0;
+}
+
 static const struct udevice_id coreboot_video_ids[] = {
        { .compatible = "coreboot-fb" },
        { }
@@ -82,5 +93,6 @@ U_BOOT_DRIVER(coreboot_video) = {
        .name   = "coreboot_video",
        .id     = UCLASS_VIDEO,
        .of_match = coreboot_video_ids,
+       .bind   = coreboot_video_bind,
        .probe  = coreboot_video_probe,
 };