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 9C6F2C001DF for ; Sun, 30 Jul 2023 17:18:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B91DE86A97; Sun, 30 Jul 2023 19:16:52 +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="NxPql/fh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1A0E3869DE; Sun, 30 Jul 2023 19:16:38 +0200 (CEST) Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 C575586A0C for ; Sun, 30 Jul 2023 19:16:32 +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-il1-x131.google.com with SMTP id e9e14a558f8ab-348ccbf27eeso18332005ab.0 for ; Sun, 30 Jul 2023 10:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1690737391; x=1691342191; 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=rQq24R+EfwfzVqANeL3qzZVsax6/QN04+9ROKTz9pCA=; b=NxPql/fhZouo28O+evXIfG1EZUPr5+vD/lhLWEYgqgTYl5Ppf5WAUqew2JqxrBPmwj Rl9jMzEZ/VX6yMl250RS+93Y29MnfAxbE16E8BfHJOrCKaZzWj2YdvlnTefNxRbDqyGf vhDMma9wSAIInvhKx6aHNeLQ+VyYM+j0P/nJI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690737391; x=1691342191; 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=rQq24R+EfwfzVqANeL3qzZVsax6/QN04+9ROKTz9pCA=; b=U2k0A5KCMcPguJr3MBbeXWMjnR76h+oQrXZinrBIHel2c8MTfY5FCbx1Cm9NTxqo7H rLk41yxW2zXcxWchA7lsVUBIFNJXBHscaR9IlBE20qhPBaIV67JzYSz1F8EaRAbsGXnE JIgbE/UKDNEkxIOBIal2U4rzrcaWrjh1CPuueseMsKedLM1vEyYoAzTDV84NOfOs+bRt Om4LAEnZmpK6wVxErW3PJxyoJUll+vIvuUVsxAZI1e++iIFbZonXkKOka9J+T/GZG6+9 ZcNJ+dkuP1AYEH81aT9/gyU/cUDOaAywzIak+4lYPOpqPhhEYMHhIYGg55nOCSAzf4Te fePg== X-Gm-Message-State: ABy/qLb/ZqGPOhBDgsE1AaAqnX04+bEy7tEYjoZw4LPRaC/b4Hb7DKSw yzxvZ/wnBMQAsfaMyraLEh5A+QROWi450G9txPU= X-Google-Smtp-Source: APBJJlEw5Lus5KsGg0aXnAGH1by8JQoptKa/yEE6UuPUPDj4g8sMBcxTMprETIyo+9lT6tWkowQOdA== X-Received: by 2002:a05:6e02:ee1:b0:347:788e:e9ff with SMTP id j1-20020a056e020ee100b00347788ee9ffmr3235472ilk.19.1690737391447; Sun, 30 Jul 2023 10:16:31 -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 l1-20020a02cd81000000b0042b57bbbaf2sm2519732jap.26.2023.07.30.10.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 Jul 2023 10:16:31 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Bin Meng , Anatolij Gustschin , Michal Suchanek , Nikhil M Jain , Ovidiu Panait , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Rasmus Villemoes , Stefan Roese Subject: [PATCH v2 7/9] video: Add a Kconfig option for SPL video handoff Date: Sun, 30 Jul 2023 11:16:05 -0600 Message-ID: <20230730171619.915576-7-sjg@chromium.org> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog In-Reply-To: <20230730171619.915576-1-sjg@chromium.org> References: <20230730171619.915576-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 --- (no changes since v1) 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 5173d0a0c2d5..42a7c536f61d 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 e0e07ed0cda5..443104c294ed 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