Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 986FCC001DF for ; Mon, 24 Jul 2023 14:53:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BBDE48683A; Mon, 24 Jul 2023 16:52:51 +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="b2WVGFza"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D86F386807; Mon, 24 Jul 2023 16:52:31 +0200 (CEST) Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (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 83E2F8676A for ; Mon, 24 Jul 2023 16:52:26 +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-xd2c.google.com with SMTP id ca18e2360f4ac-78666f06691so190508039f.0 for ; Mon, 24 Jul 2023 07:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690210345; x=1690815145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OlZ2+QGSxckXN068FW4nY064yH+VX59M+RoXPv5ZUjs=; b=b2WVGFzaS8einAMHZ/tEVFnqKVH0yl0zoruHU+ijCJirRJnX1jy8bvyagfYhstztyh Izl5sNGA+szuj5XA1TmBAMxf5k+fWOdbkxjrdZOkHXdglFU4PF7ovuFlmrZWjkId/B0B ekgq+jI0wSKS3PoXev9z20kJ9Vb7X9lh6k/VA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690210345; x=1690815145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OlZ2+QGSxckXN068FW4nY064yH+VX59M+RoXPv5ZUjs=; b=XuM5o0ngpKNnXoBso6SMIN4JvLNySNiJg6DqEuEkNPdmlL8DCgM4Qb7lDPHFhEftdj T3VFt94XyQqz1yihYlqcOrSO/4gi/Rrcw3rMKFRMJdnhYTfup9J1QIOGZICUI3yeALBV J2swGGD1d/DSB64eOu1WqAeypaq7a/KoySNMvFnizk7xL803XAWqrrMZaY06SK8f+KDK LPVtPV2+WmgdZ24jPBovb8qBHcKNyi2WflD1s5QfvGHC6EQVGvyAIXZvDiTO/TYYYkJC dYt7cIp6da23ku185SnkekHr54lTSkyjzWT+gNPIo7+Y5JAIdYCDAtaDJU6tZlXXMMR1 m2NQ== X-Gm-Message-State: ABy/qLZArOelMXnFnvKJSwHpF7Hss++1/zFn70wL4zcK1OdA6NhK99vn Luhm1naXYBkvJ2y33i0S3ixmzTgktzi1sgwWfrY= X-Google-Smtp-Source: APBJJlHgrGSgcICPeMwj5Mu65g9VbYdT3KOFKUZJlcbMYDty/vfVh1Xed4m7sCwLzFOnzwA+uXpghg== X-Received: by 2002:a6b:7b42:0:b0:786:45f7:fb7e with SMTP id m2-20020a6b7b42000000b0078645f7fb7emr115291iop.13.1690210345097; Mon, 24 Jul 2023 07:52:25 -0700 (PDT) Received: from sjg1.lan (c-73-14-173-85.hsd1.co.comcast.net. [73.14.173.85]) by smtp.gmail.com with ESMTPSA id n12-20020a5d824c000000b007862c74cec6sm3462225ioo.1.2023.07.24.07.52.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jul 2023 07:52:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Bin Meng , Simon Glass , Anatolij Gustschin , Michal Suchanek , Nikhil M Jain , Ovidiu Panait , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Stefan Roese Subject: [PATCH 7/9] video: Add a Kconfig option for SPL video handoff Date: Mon, 24 Jul 2023 08:52:03 -0600 Message-ID: <20230724145210.304917-7-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230724145210.304917-1-sjg@chromium.org> References: <20230724145210.304917-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.8 at phobos.denx.de X-Virus-Status: Clean At present this feature is enabled in SPL if a bloblist is available. Some platforms may not want to use this, so add an option to allow the feature to be disabled. Note that the feature unfortunately only fills in part of the video-handoff information, so causes failures on x86 platforms. For now, disable it there. Signed-off-by: Simon Glass --- common/board_f.c | 3 +-- drivers/video/Kconfig | 10 ++++++++++ drivers/video/video-uclass.c | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/board_f.c b/common/board_f.c index 5c8646b22283..656bd716c7ec 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -411,8 +411,7 @@ __weak int arch_reserve_mmu(void) static int reserve_video(void) { - if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL && - CONFIG_IS_ENABLED(BLOBLIST)) { + if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) { struct video_handoff *ho; ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho)); diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index b41dc60cec59..0c9c14b021fe 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -1011,6 +1011,16 @@ config SPL_VIDEO if SPL_VIDEO source "drivers/video/tidss/Kconfig" +config SPL_VIDEO_HANDOFF + bool "Pass the video frame-buffer through to U-Boot proper" + depends on SPL_BLOBLIST + default y if !X86 + help + Enable this to set up video-handoff information in SPL which can be + picked up in U-Boot proper. This includes the frame buffer and + various other pieces of information. With this enabled, SPL can set + up video and avoid re-initing it later. + config SPL_VIDEO_LOGO bool "Show the U-Boot logo on the display at SPL" default y if !SPL_SPLASH_SCREEN diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 949595f1bc69..86262a3435c2 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -141,7 +141,7 @@ int video_reserve(ulong *addrp) debug("Video frame buffers from %lx to %lx\n", gd->video_bottom, gd->video_top); - if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) { + if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(VIDEO_HANDOFF)) { struct video_handoff *ho; ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0); -- 2.41.0.487.g6d72f3e995-goog