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 493DAC6FD18 for ; Wed, 19 Apr 2023 07:33:28 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D6790861B4; Wed, 19 Apr 2023 09:33:25 +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="COf4yYdj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 27B3C861C5; Wed, 19 Apr 2023 09:33:24 +0200 (CEST) Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 BA0B285C77 for ; Wed, 19 Apr 2023 09:33:20 +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 lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33J7XHF8026515; Wed, 19 Apr 2023 02:33:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681889597; bh=CrOz5aK+Os+Xt27hlduHurbQpUgrwgV2/yjzh8aVzCc=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=COf4yYdjZjxF3U8KWjeyxnVrWTAKNATKSG1kfWuH/Gez5bTHwCBy3+J4IF5QQK85/ qZ06peuwgmyaS96lrWiQ6LZILEvVV1ZfaakoalOZtroHM349YPX1I7qwURDLiGWprl hyF5B5aCIJLDFejdT192IvoJxOF0Dfuj2pzbjhDM= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33J7XHst008397 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 19 Apr 2023 02:33:17 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Wed, 19 Apr 2023 02:33:17 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Wed, 19 Apr 2023 02:33:17 -0500 Received: from [172.24.145.96] (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33J7XF4U116752; Wed, 19 Apr 2023 02:33:16 -0500 Message-ID: <0ce1fccf-0bfd-4ad2-6884-4263d64f2a87@ti.com> Date: Wed, 19 Apr 2023 13:03:14 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH 4/4] common: spl: spl: Remove video driver before u-boot proper To: Simon Glass CC: , , , , References: <20230410082021.25246-2-n-jain1@ti.com> <20230410082021.25246-5-n-jain1@ti.com> Content-Language: en-US From: Nikhil M Jain In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit 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 Hi Simon, On 19/04/23 07:16, Simon Glass wrote: > Hi Nikhil, > > On Mon, 10 Apr 2023 at 02:21, Nikhil M Jain wrote: >> >> Add method to remove video driver before loading u-boot proper. When >> bootstage changes from SPL to u-boot proper, noo method is called to >> remove video driver, and at u-boot proper if video driver is not >> enabled, the video driver starts displaying garbage on the screen, >> because there is no reserved space for video and the frame buffer gets >> u-boot proper data written. >> >> Signed-off-by: Nikhil M Jain >> --- >> common/spl/spl.c | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/common/spl/spl.c b/common/spl/spl.c >> index a630e79866..72078a8ebc 100644 >> --- a/common/spl/spl.c >> +++ b/common/spl/spl.c >> @@ -35,6 +35,8 @@ >> #include >> #include >> #include >> +#include >> +#include >> #include >> #include >> #include >> @@ -889,6 +891,19 @@ void board_init_r(gd_t *dummy1, ulong dummy2) >> debug("Failed to stash bootstage: err=%d\n", ret); >> #endif >> >> +#if defined(CONFIG_SPL_VIDEO) > > Should use if(IS_ENABLED(...)) > > But it would be better to pass the frame buffer to U-Boot proper so it > can use the same address. This can be done with a bloblist record. See > for example [1] > Yes it would be better, I will try to use bloblist for passing frame buffer to u-boot. >> + struct udevice *dev; >> + int rc; >> + >> + rc = uclass_find_device(UCLASS_VIDEO, 0, &dev); > > uclass_find_first_device > >> + if (!rc && dev) { >> + rc = device_remove(dev, DM_REMOVE_NORMAL); >> + if (rc) >> + printf("Cannot remove video device '%s' (err=%d)\n", >> + dev->name, rc); >> + } >> +#endif >> + >> spl_board_prepare_for_boot(); >> jump_to_image_no_args(&spl_image); >> } >> -- >> 2.34.1 >> > > Regards, > Simon > > [1] https://patchwork.ozlabs.org/project/uboot/patch/20230331103047.26.Ieb0824a81d8ad4109fa501c9497b01b8749f913a@changeid/ Thanks, Nikhil