Skip to content
Snippets Groups Projects
Commit 4acb4d39 authored by Eric Nelson's avatar Eric Nelson Committed by Stefano Babic
Browse files

mxc_ipuv3: fix memory alignment of framebuffer


The frame-buffer on i.MX boards needs to be aligned for DMA.

Signed-off-by: default avatarEric Nelson <eric.nelson@boundarydevices.com>
parent 10f779da
No related branches found
No related tags found
No related merge requests found
...@@ -415,8 +415,9 @@ static int mxcfb_map_video_memory(struct fb_info *fbi) ...@@ -415,8 +415,9 @@ static int mxcfb_map_video_memory(struct fb_info *fbi)
fbi->fix.smem_len = fbi->var.yres_virtual * fbi->fix.smem_len = fbi->var.yres_virtual *
fbi->fix.line_length; fbi->fix.line_length;
} }
fbi->fix.smem_len = roundup(fbi->fix.smem_len, ARCH_DMA_MINALIGN);
fbi->screen_base = (char *)malloc(fbi->fix.smem_len); fbi->screen_base = (char *)memalign(ARCH_DMA_MINALIGN,
fbi->fix.smem_len);
fbi->fix.smem_start = (unsigned long)fbi->screen_base; fbi->fix.smem_start = (unsigned long)fbi->screen_base;
if (fbi->screen_base == 0) { if (fbi->screen_base == 0) {
puts("Unable to allocate framebuffer memory\n"); puts("Unable to allocate framebuffer memory\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment