All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC]: always relocate u-boot before the framebuffer
Date: Mon, 31 Dec 2012 15:33:53 +0100	[thread overview]
Message-ID: <20121231153353.2d9a5dda@amdc308.digital.local> (raw)
In-Reply-To: <20121229203157.0f50ba5e@black>

Hi Jeroen,

> Hi All,
> 
> Currently CONFIG_FB_ADDR can be set to specify the location of the
> frame buffer. Since Linux places the frame buffer at the end of the
> RAM, it is nice to place it at the same position so the u-boot to
> linux transition can be made flicker free, by preserving the
> frame buffer. However u-boot and it's heap prefer to locate themselves
> at the end of the RAM as well and there is nothing which prevents them
> to overlap.
> 
> While this can be set/calculated manually, it would be nicer if the
> relocation would never take place to the region occupied by the
> frame buffer. A simple way to do so is to locate u-boot before the
> frame buffer, like it is already done when the frame buffer address is
> not set.
> 
> Currently there are 2 boards using the CONFIG_FB_ADDR and CONFIG_LCD
> on arm (trats, mimc200). Would it cause any problem to relocate
> u-boot below the frame buffer on these boards?
> 
> Regards,
> Jeroen
> 
> proposed patch:
> 
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index e0cb635..4d0fc3c 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -371,9 +371,10 @@ void board_init_f(ulong bootflag)
>         gd->fb_base = CONFIG_FB_ADDR;
>  #else
>         /* reserve memory for LCD display (always full pages) */
> -       addr = lcd_setmem(addr);
> -       gd->fb_base = addr;
> +       gd->fb_base = lcd_setmem(addr);
>  #endif /* CONFIG_FB_ADDR */
> +       /* always continue placement below the frame buffer to not
> overlap */

Good idea. I will test it and let you know. 

-- 
Best regards,

Lukasz Majewski

Samsung Poland R&D Center | Linux Platform Group

  parent reply	other threads:[~2012-12-31 14:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-29 19:31 [U-Boot] [RFC]: always relocate u-boot before the framebuffer Jeroen Hofstee
2012-12-29 20:10 ` Jeroen Hofstee
2012-12-29 21:50   ` Wolfgang Denk
2012-12-29 21:47 ` Wolfgang Denk
2012-12-31 14:33 ` Lukasz Majewski [this message]
2012-12-31 14:54   ` Wolfgang Denk
2013-01-02 15:48     ` Tom Rini
2013-01-02 20:17       ` Wolfgang Denk
2013-01-03 10:27         ` Jeroen Hofstee
2013-01-03 10:41           ` Wolfgang Denk
2013-01-03 18:10             ` Jeroen Hofstee
2013-01-03 20:28               ` Wolfgang Denk
2013-01-04 20:29                 ` Jeroen Hofstee
2013-01-05 10:07                 ` Jeroen Hofstee
2013-01-05 19:18                   ` Wolfgang Denk
2013-01-03 10:43         ` [U-Boot] [PATCH v2] VIDEO: better document the correct use of CONFIG_FB_ADDR Wolfgang Denk
2013-01-14 19:29           ` Anatolij Gustschin

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=20121231153353.2d9a5dda@amdc308.digital.local \
    --to=l.majewski@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.