From patchwork Wed Jul 10 00:52:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 257931 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CB77F2C01D4 for ; Wed, 10 Jul 2013 10:52:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7C36F4A09F; Wed, 10 Jul 2013 02:52:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7wLCYvRBHgpc; Wed, 10 Jul 2013 02:52:25 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F0034A0A5; Wed, 10 Jul 2013 02:52:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DDEE04A0A5 for ; Wed, 10 Jul 2013 02:52:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RUEEI-S2Aiox for ; Wed, 10 Jul 2013 02:52:10 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=SKIP(-1.5) (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by theia.denx.de (Postfix) with ESMTPS id 92A2D4A09F for ; Wed, 10 Jul 2013 02:52:09 +0200 (CEST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3bqhgX4vn9z4KK23; Wed, 10 Jul 2013 02:52:08 +0200 (CEST) X-Auth-Info: m0c8IPnE9mvmwCaOUNLzm3GN/se9jVNcjCruqgFOG/4= Received: from mashiro.lan (unknown [195.140.253.167]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id 3bqhgX3Rr8zbbl0; Wed, 10 Jul 2013 02:52:08 +0200 (CEST) From: Marek Vasut To: u-boot@lists.denx.de Date: Wed, 10 Jul 2013 02:52:05 +0200 Message-Id: <1373417525-26947-1-git-send-email-marex@denx.de> X-Mailer: git-send-email 1.7.10.4 Cc: Marek Vasut , Fabio Estevam , Otavio Salvador Subject: [U-Boot] [PATCH] video: Allocate the MXSFB framebuffer aligned X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- drivers/video/mxsfb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index a6d8ae9..35836e1 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -202,7 +202,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;