From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Zedeck Date: Fri, 10 Apr 2009 13:13:51 -0700 (PDT) Subject: [U-Boot] Allocating a frame buffer in memory Message-ID: <22993711.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Thanks, Steve -- View this message in context: http://www.nabble.com/Allocating-a-frame-buffer-in-memory-tp22993711p22993711.html Sent from the Uboot - Users mailing list archive at Nabble.com.