public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ivan T. Ivanov <iivanov@suse.de>
To: Nicolas Saenz Julienne <nsaenz@kernel.org>,
Cc: Matthias Brugger <mbrugger@suse.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	u-boot@lists.denx.de
Subject: Re: [PATCH] rpi: Conditionally add simple-framebuffer node
Date: Fri, 13 Aug 2021 10:04:33 +0300	[thread overview]
Message-ID: <162883827371.920.4858214827273957@localhost> (raw)
In-Reply-To: <20210810143114.32329-1-iivanov@suse.de>

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.
> 
> Signed-off-by: Ivan T. Ivanov <iivanov@suse.de>
> ---
>  board/raspberrypi/rpi/rpi.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> 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)
>  
>  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 enabled DT
> -        * node exists for the "real" graphics driver.
> -        */
> -       lcd_dt_simplefb_add_node(blob);
> +       int node;
> +
> +       node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");
> +       if (node < 0)
> +               lcd_dt_simplefb_add_node(blob);
>  
>  #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

  reply	other threads:[~2021-08-13 12:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10 14:31 [PATCH] rpi: Conditionally add simple-framebuffer node Ivan T. Ivanov
2021-08-13  7:04 ` Ivan T. Ivanov [this message]
2021-09-15 11:35 ` Matthias Brugger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=162883827371.920.4858214827273957@localhost \
    --to=iivanov@suse.de \
    --cc=jh80.chung@samsung.com \
    --cc=m.szyprowski@samsung.com \
    --cc=mbrugger@suse.com \
    --cc=nsaenz@kernel.org \
    --cc=pbrobinson@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox