mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
mxc_ipuv3: fix memory alignment of framebuffer
The frame-buffer on i.MX boards needs to be aligned for DMA. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
This commit is contained in:
parent
10f779da54
commit
4acb4d391f
1 changed files with 3 additions and 2 deletions
|
@ -415,8 +415,9 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)
|
|||
fbi->fix.smem_len = fbi->var.yres_virtual *
|
||||
fbi->fix.line_length;
|
||||
}
|
||||
|
||||
fbi->screen_base = (char *)malloc(fbi->fix.smem_len);
|
||||
fbi->fix.smem_len = roundup(fbi->fix.smem_len, ARCH_DMA_MINALIGN);
|
||||
fbi->screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
|
||||
fbi->fix.smem_len);
|
||||
fbi->fix.smem_start = (unsigned long)fbi->screen_base;
|
||||
if (fbi->screen_base == 0) {
|
||||
puts("Unable to allocate framebuffer memory\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue