]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/video/mxsfb.c
video: Allocate the MXSFB framebuffer aligned
[karo-tx-uboot.git] / 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;