From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC]: always relocate u-boot before the framebuffer
Date: Thu, 03 Jan 2013 11:27:48 +0100 [thread overview]
Message-ID: <50E55D24.8000809@myspectrum.nl> (raw)
In-Reply-To: <20130102201725.DC80A20035D@gemini.denx.de>
Hello Tom, Wolfgang,
On 01/02/2013 09:17 PM, Wolfgang Denk wrote:
> Dear Tom,
>
> In message <20130102154854.GC14738@bill-the-cat> you wrote:
>> I think this means we've got people not understanding what the variable
>> IS for. And at the high level, the idea of "lets transition from U-Boot
>> to Linux without a flicker" is good. So, what is the variables we
>> should be using for this, today? Or do we need to add and document
>> more? Or are we all just failing to RTFM here?
I did read the document. Especially "Then system will reserve the
frame buffer address to defined address instead of lcd_setmem"
is a bit misleading, given that nothing is "reserved" it is just assumed
to be free.
> I think the key problem is insufficient documentation of what
> CONFIG_FB_ADDR is intended for (i. e. graphics controllers with
> external video RAM). Eventualy a patch as attached might help?
>
> The idea of "lets transition from U-Boot to Linux without a flicker"
> is as old as PPCBoot (i. e. even predates U-Boot). The standard
> mechanism as implemented should work out of the box, assuming that
> both U-Boot and Linux use the same configuration of the graphics
> controller (resulting in the same size of the needed frame buffer
> memory). And if they use different configurations, you won't be able
> to pass a pre-initialized frame buffer ayway.
>
> The problem Jeroen ran into is/was caused by the fct that U-Boot and
> Linux computed different sizes for the frame buffer. I think this is
> either a bug, or a difference in the configuration, but Jeroen did not
> reply to my question for the reason for this difference yet.
>
I encountered this issue on a omap board / dss. Currently the amount
of video ram is passed with a vram= argument to linux and allocated
at the end of the ram. This is 16Mb by default I have CONFIG_FB_ADDR
set to end of RAM minus that. U-boot then relocates _into_ my frame
buffer and all goes well since I have a small lcd and only use the first
500k or so.
So the intention was to fix that while preserving the frame buffer and I
don't want linux to steal so much memory. The minimum amount of
memory the dss accepts is 2MB though (for reason unknown to me).
Without the fb address set U-boot will allocate it at 1MB before the end
of the ram, since it does not have the 2MB minimum. With the fb address
set to -2MB u-boot will allocate itself over it, hence the patch, do
actually
reserve the frame buffer (well in the most simplistic way, by placing
everything before it).
As Wolfgang suggested, maybe I shouldn't point at U-boot but blame
linux and get rid of the 2MB alignment. I haven't checked yet, but I
don't see why that should not work. So this is resolved for my
case (thanks for the suggestion) for now until I meet
http://www.mail-archive.com/linux-omap at vger.kernel.org/msg80440.html
> diff --git a/README b/README
> index 78f40df..f84108e 100644
> --- a/README
> +++ b/README
> @@ -2695,11 +2695,14 @@ FIT uImage format:
> - Frame Buffer Address:
> CONFIG_FB_ADDR
>
> - Define CONFIG_FB_ADDR if you want to use specific
> - address for frame buffer.
> - Then system will reserve the frame buffer address to
> - defined address instead of lcd_setmem (this function
> - grabs the memory for frame buffer by panel's size).
> + Define CONFIG_FB_ADDR if you want to use specific
> + address for frame buffer. This is typically the case
> + when using a graphics controller has separate video
> + memory. U-Boot will then reserve the frame buffer at
> + the given address instead of dynamically reserving it
> + in system RAM by calling lcd_setmem(), which grabs
> + the memory for the frame buffer depending on the
> + configured panel size.
>
> Please see board_init_f function.
>
Maybe it is clearer as "U-boot will then place the frame buffer at ...
instead of reserving"
Regards,
Jeroen
next prev parent reply other threads:[~2013-01-03 10:27 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
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 [this message]
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=50E55D24.8000809@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--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.