summaryrefslogtreecommitdiff
path: root/drivers/video/mxsfb.c
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2013-07-30 23:37:52 +0200
committerAnatolij Gustschin <agust@denx.de>2013-08-09 21:48:44 +0200
commite57baf5d199e9a330032de29025af955717ebdf9 (patch)
tree46cf1533ee10bc01c7024f89ba5a757e7f62154a /drivers/video/mxsfb.c
parent69f7345c95011cdc46d0ecf5e62c16d711e2eb2a (diff)
downloadu-boot-imx-e57baf5d199e9a330032de29025af955717ebdf9.zip
u-boot-imx-e57baf5d199e9a330032de29025af955717ebdf9.tar.gz
u-boot-imx-e57baf5d199e9a330032de29025af955717ebdf9.tar.bz2
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 <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>
Diffstat (limited to 'drivers/video/mxsfb.c')
-rw-r--r--drivers/video/mxsfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 6bf9fc5..374c823 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;