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 X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38136C432BE for ; Fri, 13 Aug 2021 12:19:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 8DA1E610E9 for ; Fri, 13 Aug 2021 12:19:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8DA1E610E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1892582DCE; Fri, 13 Aug 2021 14:19:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de 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=suse.de header.i=@suse.de header.b="xeRAt2eI"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="YwhbAAcD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EA87382DC2; Fri, 13 Aug 2021 09:04:38 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B85D180F4B for ; Fri, 13 Aug 2021 09:04:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=iivanov@suse.de Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 78B3E2229F; Fri, 13 Aug 2021 07:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1628838274; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h32IPhEYXEQ32ps6n1Z1RfJfaPlgORR2uls6EfSPeys=; b=xeRAt2eIfWFeiRDexfSCWVSRJRGDSwhQTSV64zAHaqdyEbzLRbi1zxFIcHsyaHRwuGqGRb VBJ+Ajooit2YY86EB6uKeWvNddtgUrn4bPUWe3OYFFWv5F3QCcamJp2TZKTVD0qdxHBxUV xWnlaNBr8wPkT1fKPM+6D7DlzTaVlig= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1628838274; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h32IPhEYXEQ32ps6n1Z1RfJfaPlgORR2uls6EfSPeys=; b=YwhbAAcD19Jmk2TkXjCgrf4mNdmY0r6aIx3040KtVFyI2KBKQNWVbqKFBtFB6v9UG9Mu8i 14A7YUiW5Vg8yBDw== Received: from imap1.suse-dmz.suse.de (imap1.suse-dmz.suse.de [192.168.254.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap1.suse-dmz.suse.de (Postfix) with ESMTPS id 4B8B6139C2; Fri, 13 Aug 2021 07:04:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap1.suse-dmz.suse.de with ESMTPSA id E78ZEoIZFmEpKQAAGKfGzw (envelope-from ); Fri, 13 Aug 2021 07:04:34 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20210810143114.32329-1-iivanov@suse.de> References: <20210810143114.32329-1-iivanov@suse.de> From: Ivan T. Ivanov To: Nicolas Saenz Julienne , Cc: Matthias Brugger , Peter Robinson , Marek Szyprowski , Jaehoon Chung , u-boot@lists.denx.de Subject: Re: [PATCH] rpi: Conditionally add simple-framebuffer node Date: Fri, 13 Aug 2021 10:04:33 +0300 Message-ID: <162883827371.920.4858214827273957@localhost> User-Agent: alot/0.9.1 X-Mailman-Approved-At: Fri, 13 Aug 2021 14:19:30 +0200 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Hi, Quoting Ivan T. Ivanov (2021-08-10 17:31:14) > It appears that RPi firmware has already added framebuffer > node under /chosen, at least on RPi 2 versions. So check > for this and don't add duplicate node. >=20 > Signed-off-by: Ivan T. Ivanov > --- > board/raspberrypi/rpi/rpi.c | 11 +++++------ > 1 file changed, 5 insertions(+), 6 deletions(-) >=20 > diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c > index df52a4689f..372b26b6f2 100644 > --- a/board/raspberrypi/rpi/rpi.c > +++ b/board/raspberrypi/rpi/rpi.c > @@ -497,12 +497,11 @@ void *board_fdt_blob_setup(void) > =20 > int ft_board_setup(void *blob, struct bd_info *bd) > { > - /* > - * For now, we simply always add the simplefb DT node. Later, we > - * should be more intelligent, and e.g. only do this if no enable= d DT > - * node exists for the "real" graphics driver. > - */ > - lcd_dt_simplefb_add_node(blob); > + int node; > + > + node =3D fdt_node_offset_by_compatible(blob, -1, "simple-framebuf= fer"); > + if (node < 0) > + lcd_dt_simplefb_add_node(blob); > =20 > #ifdef CONFIG_EFI_LOADER > /* Reserve the spin table */ Could someone take a look into this fix, please. BTW, original message still awaits list moderator approval. Thank you! Ivan