From mboxrd@z Thu Jan 1 00:00:00 1970 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 9DDCFC7618E for ; Sat, 18 Mar 2023 20:21:07 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 51F8485A22; Sat, 18 Mar 2023 21:20:53 +0100 (CET) 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="gr95ylm9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5099085A1D; Sat, 18 Mar 2023 21:20:51 +0100 (CET) Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) (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 AEBB38596B for ; Sat, 18 Mar 2023 21:20:44 +0100 (CET) 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@google.com Received: by mail-ed1-x531.google.com with SMTP id fd5so32805290edb.7 for ; Sat, 18 Mar 2023 13:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1679170844; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/hfuEqxYEQ5yynX8HZBgGF3fJBVFaqyNkgI0Mkl9e+Y=; b=gr95ylm97KGMcMkUR0DP5tNDM4tIPSnvuQyiAknjaVQSeHdylqjpjQ7zAC1F+v75J4 eDFcpLvwjOa1rtON+semlCYifodd/QekgYlPGFL+6KngGdHmoIxvQFQyfasBVLPHNqjW +bAKlcHLulRNGIkt7NXxpeFxyG4iXXLIVwE+4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679170844; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/hfuEqxYEQ5yynX8HZBgGF3fJBVFaqyNkgI0Mkl9e+Y=; b=sM39Hlk+sUxRkXgX/YXS4+8tNhI1/wQsoapHwKfhFzswODsnzbQ/GWZhA/G/OOHg6Q 22IYbe3v/eSRExcPtWeIKWJ3ORzRG7YLQ7QiaWvRvppsAaLyqKNKtfFUvpiAyOkfe5zl 7MCIKTYkR1YhFLHoUIMSCKohduGu7s2E2jpE1eBD6/u6KYcCqHJoR9NK6znEkL1eFqre vztkIKkZ50MULKl1fAJI5vjtT+vP/3bWPzslZkOHSFI52fLUtrt1F98bBnzz84lJgmve +Hf1Ph/sOJ64Z6qwsYwN7i1861N49XudJyiQuoTZ2+EZwS1J7fbFmYsyGs6CQg7QI/oc 215A== X-Gm-Message-State: AO0yUKVPq/ryPOd+TgN5cD0Ne1YkPS8MQwCFw2LAkE7PIe2fX4Ht+kxM yQrZfa9zmJXhwd/4fOIK09310pnUmqahx1RUpzpgmQ== X-Google-Smtp-Source: AK7set+EKuwMLBQhLSX2b3YqAyc+3d+CrR51EQqZf6StpxyXnH0g8qL0BYIMhIqNltdmkBfl7GJFr1fPo1CP9ZL9Jxs= X-Received: by 2002:a50:ab12:0:b0:4fb:ebdd:6a03 with SMTP id s18-20020a50ab12000000b004fbebdd6a03mr3852094edc.5.1679170843763; Sat, 18 Mar 2023 13:20:43 -0700 (PDT) MIME-Version: 1.0 References: <20230313101459.58986-1-n-jain1@ti.com> <88e69942-9bae-0039-cb0f-0191c6a58341@ti.com> <20f1ccac-48e2-78cf-7434-c890cd334cb3@ti.com> In-Reply-To: <20f1ccac-48e2-78cf-7434-c890cd334cb3@ti.com> From: Simon Glass Date: Sun, 19 Mar 2023 09:20:24 +1300 Message-ID: Subject: Re: [PATCH 0/9] Enable splash screen To: Nikhil M Jain Cc: u-boot@lists.denx.de, agust@denx.de, devarsht@ti.com, trini@konsulko.com, vigneshr@ti.com, nsekhar@ti.com Content-Type: text/plain; charset="UTF-8" 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 Hi Nikhil, On Fri, 17 Mar 2023 at 02:13, Nikhil M Jain wrote: > > Hi Simon, > > On 16/03/23 10:10, Nikhil M Jain wrote: > > Hi Simon, > > > > On 15/03/23 19:38, Simon Glass wrote: > >> Hi Nikhil, > >> > >> On Wed, 15 Mar 2023 at 00:07, Nikhil M Jain wrote: > >>> > >>> Hi Simon, > >>> > >>> On 15/03/23 03:38, Simon Glass wrote: > >>>> Hi Nikhil, > >>>> > >>>> On Mon, 13 Mar 2023 at 04:15, Nikhil M Jain wrote: > >>>>> > >>>>> To enable splash screen at SPL stage move video driver and splash > >>>>> screen > >>>>> framework at SPL, which will bring up image on display very quickly > >>>>> and > >>>>> thus have early display support in SPL. > >>>>> > >>>>> Nikhil M Jain (9): > >>>>> drivers: video: Kconfig: Necessary configs for video at SPL > >>>>> drivers: video: tidss: Kconfig: Configs to enable TIDSS at SPL > >>>>> cmd: Kconfig: Add necessary configs for splash screen at SPL > >>>>> drivers: video: Makefile: Compile video driver files at SPL > >>>>> drivers: video: tidss: Makefile: Add condition to compile TIDSS > >>>>> at SPL > >>>>> cmd: Makefile: Add rules to build bmp.c and read.c at SPL > >>>>> common: splash: Enable splash_display at SPL stage > >>>>> drivers: video: video-uclass: Disable u-boot logo at SPL > >>>>> board: ti: am62x: evm: OSPI support for splash screen > >>>>> > >>>>> board/ti/am62x/evm.c | 6 ++++++ > >>>>> cmd/Kconfig | 17 +++++++++++++++++ > >>>>> cmd/Makefile | 2 ++ > >>>>> common/splash.c | 2 +- > >>>>> drivers/video/Kconfig | 32 ++++++++++++++++++++++++++++---- > >>>>> drivers/video/Makefile | 6 ++++++ > >>>>> drivers/video/tidss/Kconfig | 6 ++++++ > >>>>> drivers/video/tidss/Makefile | 1 + > >>>>> drivers/video/video-uclass.c | 2 +- > >>>>> include/splash.h | 2 +- > >>>>> 10 files changed, 69 insertions(+), 7 deletions(-) > >>>> > >>>> I'm not necessarily arguing against this, but what is the need for > >>>> this? How many milliseconds earlier does the image appear with this > >>>> patch? What is the bottleneck? We should be able to get to U-Boot > >>>> proper very quickly. > >>>> > >>> There is a significant difference in time, by adding support in SPL > >>> splash screen comes up by approx 650ms and at u-boot proper it comes at > >>> 2.6s, measured from first print in console as seen on AM62x. Also we > >>> plan to skip u-boot proper and load kernel directly. > >> > >> Yes that really is terrible. It should be under a second for U-Boot > >> proper! > >> > >> Have you tried using bootstage to report the numbers? > >> > > No I haven't used the bootstage, I will use it to get the numbers. > > > Boot stage logs > link: https://gist.github.com/NikMJain/beb60fe42b1e89829cdd5b8713284330 > > > >> Have you tried using tracing to figure out what is wrong? Is it just > >> slow storage? > >> > > U-boot proper comes up in one sec but the splash display is called > > through stdio_add_devices which is late in the board_init_r sequence > > defined in board_r.c. > > >> Regards, > >> Simon > > > > Thanks > > On AM62x we have multi-stage boot first R5 SPL comes up then A53 SPL and > u-boot proper, due to which splash screen at u-boot proper takes over 2 > sec. On AM62x we have an aggressive requirement for an early splash > screen. Hence we are moving splash screen support to SPL., which will > bring splash screen time to approx 600 ms. > > We also want to support falcon boot mode from A53 SPL, we have customers > who don't want u-boot proper in production boot flow and still require > splash screen, the only way to support it is to add splash screen at SPL. > > u-boot logs with splash screen timings, measurement through > timer_get_boot_us at u-boot proper and SPL. > link: https://gist.github.com/NikMJain/3be0b6c92092678b6aec8e5fdbc46a98 I think it would be worth looking at what is taking so long. Could you add bootstage in there (which supports SPL as well) and produce a final report? Is BL31 taking a while?You can use bootstage_start()/bootstage_accum() to collect time on MMC loading, etc. even if you don't want to enable CONFIG_TRACE. This is an important area that will affect a lot of boards. If it takes 2 seconds to get into U-Boot, everyone is going to want to avoid it. Regards, Simon