From patchwork Mon May 25 01:48:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1297059 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=jtyu+7qE; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Vg9D58tfz9sPF for ; Mon, 25 May 2020 11:53:20 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 292818190C; Mon, 25 May 2020 03:50:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="jtyu+7qE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 996BF812F8; Mon, 25 May 2020 03:49:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1F0A4801D6 for ; Mon, 25 May 2020 03:49:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id j8so17204043iog.13 for ; Sun, 24 May 2020 18:49:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ROi0Ud8HfB8I0NpK6UzetmXIpgnS00JozZlsmiTvJYg=; b=jtyu+7qEmYUIhhOx+/wJs5b7jhDwzTnZV/dwn+DNaSLgG4QajbiuHZpYYbE+ywyjk2 5oNy3FPfQAd8p5klzdN5PvZEhKbyUKKzsk3VF9JLd5J0uoxuY10eSnTDlNA2mcbgCnXG goVt5LK38E1p2HzaMbwLece+byjoDZ+7dr7IU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ROi0Ud8HfB8I0NpK6UzetmXIpgnS00JozZlsmiTvJYg=; b=A/zTxxUuwmH4YYPk+yoTQCjjDDxAYW5Dc9dZWEAPTT5k95alf2hRNuN4owFT1TQNBr gnBqw69a9OoL5hKwfiARlZI5CZ3xRFLalC8xCuAeBlvm0V+efeExOeNHuVA77I8xTL4J ZEm55ZTnEKhEP4VUn5JExcIbQT3Ph4JNwlL5+M2XIOePBvVUKxT9KUr37fz2Cw5LwbZ+ NRbO2RiUmOfjOWIzeuwHYlXDZjHXVUpJr/TLwENo9CVLF3El69ELGvHlIz37l5AuEUsw LXgmMXIbv22Dv6ZmfUpTVQWY+FjZLf/OH/f1GNWSXfJASSTS4d4nmOMqqGfKBEc4Pqmg htFA== X-Gm-Message-State: AOAM531Np76HvcA+xGNhxIotvWQr1bXG71XW4vBaTEYKhX8Ve3AK8mn4 T9FGNkgBM+3Nlt2e6MQOGnAibc9XEYyrEA== X-Google-Smtp-Source: ABdhPJzbi75g9u+GeOUjSNLenqGIR+kRl4yMJUBByRbVpfXXnrkfqNgy9/nsCwm2ADFH+YDvLUQnWQ== X-Received: by 2002:a02:a19d:: with SMTP id n29mr3203364jah.85.1590371363899; Sun, 24 May 2020 18:49:23 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id s7sm6822965ioc.37.2020.05.24.18.49.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 May 2020 18:49:23 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Anatolij Gustschin Subject: [PATCH v2 20/26] x86: fsp: video: Allocate a frame buffer when needed Date: Sun, 24 May 2020 19:48:57 -0600 Message-Id: <20200524194852.v2.20.I924a9e665cb5136a4034703a9360c1b4049c97b7@changeid> X-Mailer: git-send-email 2.27.0.rc0.183.gde8f92d652-goog In-Reply-To: <20200525014904.115621-1-sjg@chromium.org> References: <20200525014904.115621-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean 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 --- Changes in v2: None 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 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[] = {