summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2013-07-27 00:53:45 (GMT)
committerStefano Babic <sbabic@denx.de>2013-07-29 10:17:32 (GMT)
commit4acb4d391f005c0c72f7b84041b3884e4260a5a4 (patch)
treecc1cbca8bf8d8a098d9b94d6b89b166510fc1757 /drivers/video
parent10f779da54b8a8c85df6d58592c40836d8e7ed49 (diff)
downloadu-boot-fsl-qoriq-4acb4d391f005c0c72f7b84041b3884e4260a5a4.tar.xz
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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mxc_ipuv3_fb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index ace226c..d922d5d 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -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");