]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/video/mxc_ipuv3_fb.c
Merge git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / drivers / video / mxc_ipuv3_fb.c
index ace226cececfa72a1202d24a67e49ed8e7507156..3e21fb23067c0dc41c16f35fc58964db806eae07 100644 (file)
@@ -8,23 +8,7 @@
  *
  * (C) Copyright 2004-2010 Freescale Semiconductor, Inc.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -415,8 +399,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");