From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Allocating a frame buffer in memory
Date: Fri, 17 Apr 2009 21:32:32 +0200 [thread overview]
Message-ID: <20090417193232.GA5679@game.jcrosoft.org> (raw)
In-Reply-To: <22993711.post@talk.nabble.com>
On 13:13 Fri 10 Apr , Steven Zedeck wrote:
>
> Hi,
> I am trying to allocate a frame buffer for my LCD code. I think I understand
> how to set up the LCC controller in the Atmel AT91SAM9. So thats not the
> issue, at least not yet. I need to understand how UBoot allocates a block of
> memory for the buffer.
>
> My TFT/LCD is 320x240 and in 24 bit mode, so 3 bytes per pixel. So I think I
> need 320x240x3 total bytes. Correct?
>
> In my lib_arm/board.c file, there is the following:
> #ifdef CONFIG_LCD
> /* board init may have inited fb_base */
> if (!gd->fb_base) {
> # ifndef PAGE_SIZE
> # define PAGE_SIZE 4096
> # endif
> /*
> * reserve memory for LCD display (always full pages)
> */
> /* bss_end is defined in the board-specific linker script */
> addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1);
> size = lcd_setmem (addr);
> gd->fb_base = addr;
> }
> #endif /* CONFIG_LCD */
>
> Then in lcd.c, there is lcd_setmem which displays:
> Reserving 600k for LCD Framebuffer at: 0x23E91000
>
> Even though I call lcd_setmem with an address of: 0x23F27000
>
> Which is the address that I pass to the Atmel LCD controller DMA Address ?
> I have been using this: 0x23F27000
on at91sam9 to specify the frambuffer base address you will just need to fill
gd->fb_base = AT91SAM9263_SRAM0_BASE;
or something else as done with the PSRAM for the pm9263
in your board init and specify your "vidinfo_t panel_info"
that's all (maybe you will need to check the LCD pin out configuration)
Best Regards,
J.
prev parent reply other threads:[~2009-04-17 19:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 20:13 [U-Boot] Allocating a frame buffer in memory Steven Zedeck
2009-04-17 19:32 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20090417193232.GA5679@game.jcrosoft.org \
--to=plagnioj@jcrosoft.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