From: Marek Vasut Date: Tue, 30 Jul 2013 21:37:52 +0000 (+0200) Subject: video: Allocate the MXSFB framebuffer aligned X-Git-Tag: v2013.10-rc1~35^2~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e57baf5d199e9a330032de29025af955717ebdf9;p=oweals%2Fu-boot.git video: Allocate the MXSFB framebuffer aligned Allocate the framebuffer aligned so it can be flushed and the flush_dcache_range() function won't complain. Signed-off-by: Marek Vasut Cc: Anatolij Gustschin Cc: Fabio Estevam Cc: Otavio Salvador Cc: Stefano Babic Acked-by: Stefano Babic --- diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 6bf9fc5036..374c823d06 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -161,7 +161,8 @@ void *video_hw_init(void) panel.memSize = mode.xres * mode.yres * panel.gdfBytesPP; /* Allocate framebuffer */ - fb = malloc(panel.memSize); + fb = memalign(ARCH_DMA_MINALIGN, + roundup(panel.memSize, ARCH_DMA_MINALIGN)); if (!fb) { printf("MXSFB: Error allocating framebuffer!\n"); return NULL;