From patchwork Fri Jul 3 03:12:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 240687 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Thu, 2 Jul 2020 21:12:31 -0600 Subject: [RESEND PATCH v3 20/26] x86: fsp: video: Allocate a frame buffer when needed In-Reply-To: <20200703031237.1546362-1-sjg@chromium.org> References: <20200703031237.1546362-1-sjg@chromium.org> Message-ID: <20200702211204.RESEND.v3.20.I924a9e665cb5136a4034703a9360c1b4049c97b7@changeid> 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 Reviewed-by: Anatolij Gustschin --- (no changes since v1) arch/x86/lib/fsp/fsp_graphics.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/x86/lib/fsp/fsp_graphics.c b/arch/x86/lib/fsp/fsp_graphics.c index 6e23f3c95f..e8c1e07af1 100644 --- a/arch/x86/lib/fsp/fsp_graphics.c +++ b/arch/x86/lib/fsp/fsp_graphics.c @@ -117,6 +117,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" }, { } @@ -126,7 +136,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[] = {