video: Allocate the MXSFB framebuffer aligned
authorMarek Vasut <marex@denx.de>
Tue, 30 Jul 2013 21:37:52 +0000 (23:37 +0200)
committerAnatolij Gustschin <agust@denx.de>
Fri, 9 Aug 2013 19:48:44 +0000 (21:48 +0200)
Allocate the framebuffer aligned so it can be flushed
and the flush_dcache_range() function won't complain.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
drivers/video/mxsfb.c

index 6bf9fc5036e351edfd8ee5d4c7276be54fb6d9dd..374c823d064ca137b1954d6dd915c0be04b8d263 100644 (file)
@@ -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;