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 B714AC7EE22 for ; Tue, 9 May 2023 10:34:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 21F11857CD; Tue, 9 May 2023 12:32:14 +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="vor9CSRT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 40E07847D7; Tue, 9 May 2023 12:32:10 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 D46C9847D7 for ; Tue, 9 May 2023 12:32:07 +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 lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 349AW5tD036166; Tue, 9 May 2023 05:32:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683628325; bh=3AP2yxeUYLAPm8fskns6TjUkT0uc2FwQ1XtkXwkb+OA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vor9CSRTTjkvfc7V39FRLmRzHo9XdqdhmPHOkLSTlZmKy/s3dpsWeBRjaPEcARy1q S8RH0TiNIHl7xq6IOB/gvIAMHx0zsqS4Tc+C7tbqsoWfgxOpTJX33CwH9zG1+EAZHg Vnl+0nQh7Xw3SyVYoamlJAkA9h+KQP0+9cmgtui8= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 349AW5J5027891 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 May 2023 05:32:05 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 9 May 2023 05:32:05 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE103.ent.ti.com (157.170.170.33) 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; Tue, 9 May 2023 05:32:05 -0500 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 349AW46m007714; Tue, 9 May 2023 05:32:04 -0500 From: Nikhil M Jain To: , CC: , , , Subject: [PATCH V3 08/10] common: spl: spl: Remove video driver before u-boot proper Date: Tue, 9 May 2023 16:01:44 +0530 Message-ID: <20230509103146.81969-9-n-jain1@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230509103146.81969-1-n-jain1@ti.com> References: <20230509103146.81969-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 Add method to remove video driver before loading u-boot proper, when there is no bloblist passed to next stage, to avoid displaying of artifacts in the next stage, if video is not defined in that stage. Signed-off-by: Nikhil M Jain --- V3 (patch introduced): - Remove video only if SPL_VIDEO_REMOVE is defined. V2: - No change. common/spl/spl.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/common/spl/spl.c b/common/spl/spl.c index 21a62521a9..8b67a37a26 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 IS_ENABLED(CONFIG_SPL_VIDEO_REMOVE) + struct udevice *dev; + int rc; + + rc = uclass_find_first_device(UCLASS_VIDEO, &dev); + 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