diff mbox series

[20/26] x86: fsp: video: Allocate a frame buffer when needed

Message ID 20200519231058.19945-21-sjg@chromium.org
State Superseded
Headers show
Series x86: video: Speed up the framebuffer | expand

Commit Message

Simon Glass May 19, 2020, 11:10 p.m. UTC
When the copy framebuffer is in use, we must also have the standard U-Boot
framebuffer available. Update the FSP driver to support this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/lib/fsp/fsp_graphics.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Anatolij Gustschin May 22, 2020, 3:42 p.m. UTC | #1
On Tue, 19 May 2020 17:10:52 -0600
Simon Glass sjg at chromium.org wrote:

> When the copy framebuffer is in use, we must also have the standard U-Boot
> framebuffer available. Update the FSP driver to support this.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Anatolij Gustschin <agust at denx.de>
diff mbox series

Patch

diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c
index 70224c1a48..4eaa4fa6d4 100644
--- a/arch/x86/lib/fsp/fsp_graphics.c
+++ b/arch/x86/lib/fsp/fsp_graphics.c
@@ -116,6 +116,16 @@  err:
 	return ret;
 }
 
+static int fsp_video_bind(struct udevice *dev)
+{
+	struct video_uc_platdata *plat = dev_get_uclass_platdata(dev);
+
+	/* Set the maximum supported resolution */
+	plat->size = 2560 * 1600 * 4;
+
+	return 0;
+}
+
 static const struct udevice_id fsp_video_ids[] = {
 	{ .compatible = "fsp-fb" },
 	{ }
@@ -125,7 +135,9 @@  U_BOOT_DRIVER(fsp_video) = {
 	.name	= "fsp_video",
 	.id	= UCLASS_VIDEO,
 	.of_match = fsp_video_ids,
+	.bind	= fsp_video_bind,
 	.probe	= fsp_video_probe,
+	.flags	= DM_FLAG_PRE_RELOC,
 };
 
 static struct pci_device_id fsp_video_supported[] = {