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 5C144C7EE43 for ; Fri, 9 Jun 2023 11:53:06 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36DED861B9; Fri, 9 Jun 2023 13:52:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com 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=ti.com header.i=@ti.com header.b="hYqu5Nqv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C7F2586181; Fri, 9 Jun 2023 13:51:53 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 578F1861B0 for ; Fri, 9 Jun 2023 13:51:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-jain1@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 359BpgAf009775; Fri, 9 Jun 2023 06:51:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686311502; bh=k7D1FK9f1NojthhWDEs5nZk0YsnNrF5t9QC2ZVniauo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hYqu5NqvMNC5IttRkJ+5AZc6IA597O8CGjKRvXTTq/JKq4BtJGud7VwsFl+0VOin+ WHPyQWZ2t9WPVJklQjTPe8gmQXcmEwshjU0VrWXd1Uxq+iXWAicLzlnPkIWj9MavYh /tI5QHZZR5tJ065SBrwou/wor3cBO7u5Rc3cBxBQ= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 359BpgYb014026 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 9 Jun 2023 06:51:42 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 9 Jun 2023 06:51:41 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 9 Jun 2023 06:51:41 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 359BpelU018957; Fri, 9 Jun 2023 06:51:41 -0500 From: Nikhil M Jain To: CC: , , , , , Subject: [PATCH V2 5/8] common: board_f: Pass frame buffer info from SPL to u-boot Date: Fri, 9 Jun 2023 17:21:19 +0530 Message-ID: <20230609115122.14791-6-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230609115122.14791-1-n-jain1@ti.com> References: <20230609115122.14791-1-n-jain1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 U-boot proper can use frame buffer address passed from SPL to reserve the memory area used by framebuffer set in SPL so that splash image set in SPL continues to get displayed while u-boot proper is running. Put the framebuffer address and size in a bloblist to make them available at u-boot proper, if in u-boot proper CONFIG_VIDEO is defined. Signed-off-by: Nikhil M Jain --- V2: - Fix commit message. - Revert use of #if. common/board_f.c | 12 +++++++++++- drivers/video/video-uclass.c | 12 ++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/common/board_f.c b/common/board_f.c index 1688e27071..418aecc18f 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -411,7 +411,17 @@ __weak int arch_reserve_mmu(void) static int reserve_video(void) { - if (IS_ENABLED(CONFIG_VIDEO)) { + + if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL && + CONFIG_IS_ENABLED(BLOBLIST)) { + struct video_handoff *ho; + + ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho)); + if (!ho) + return log_msg_ret("blf", -ENOENT); + video_reserve_from_bloblist(ho); + gd->relocaddr = ho->fb; + } else if(CONFIG_IS_ENABLED(VIDEO)){ ulong addr; int ret; diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 68ce681bb9..f8f0dc0311 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -6,12 +6,14 @@ #define LOG_CATEGORY UCLASS_VIDEO #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -139,6 +141,16 @@ 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)) { + struct video_handoff *ho; + + ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0); + if (!ho) + return log_msg_ret("blf", -ENOENT); + ho->fb = *addrp; + ho->size = size; + } + return 0; } -- 2.34.1