From patchwork Wed Aug 8 15:10:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Majewski?= X-Patchwork-Id: 175938 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 D35072C00A1 for ; Thu, 9 Aug 2012 01:10:58 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C6A5F2815B; Wed, 8 Aug 2012 17:10:54 +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 jPn1w1h54uDd; Wed, 8 Aug 2012 17:10:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5736E28153; Wed, 8 Aug 2012 17:10:53 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 74D9A28154 for ; Wed, 8 Aug 2012 17:10:51 +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 HMhEGixtNZ9z for ; Wed, 8 Aug 2012 17:10:50 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by theia.denx.de (Postfix) with ESMTP id 26DB728152 for ; Wed, 8 Aug 2012 17:10:48 +0200 (CEST) Received: from epcpsbgm1.samsung.com (mailout2.samsung.com [203.254.224.25]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M8F00IXGZHXS050@mailout2.samsung.com> for u-boot@lists.denx.de; Thu, 09 Aug 2012 00:10:46 +0900 (KST) X-AuditID: cbfee61a-b7f616d000004b7e-dc-502281758c0b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 46.94.19326.57182205; Thu, 09 Aug 2012 00:10:45 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0M8F00GUFZHRYB30@mmp1.samsung.com> for u-boot@lists.denx.de; Thu, 09 Aug 2012 00:10:45 +0900 (KST) From: Lukasz Majewski To: u-boot@lists.denx.de Date: Wed, 08 Aug 2012 17:10:34 +0200 Message-id: <1344438635-31169-1-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDJMWRmVeSWpSXmKPExsVy+t9jAd3SRqUAg4XXTCze7u1kd2D0OHtn B2MAYxSXTUpqTmZZapG+XQJXxuu1s9kLvnBVLN15jrWB8QFHFyMnh4SAicSqh1uZIWwxiQv3 1rN1MXJxCAksYpR4s24ZI4SzmEli66+vrCBVbAJ6Ep/vPmUCsUUEJCR+9V8FK2IWmMwo8ejq TBaQhLBAtMTEw7vBilgEVCUO/PsBZvMKuEl0XnvPBLFOXuLp/T62CYzcCxgZVjGKphYkFxQn peca6hUn5haX5qXrJefnbmIE+/GZ1A7GlQ0WhxgFOBiVeHijkhUDhFgTy4orcw8xSnAwK4nw vg1WChDiTUmsrEotyo8vKs1JLT7EKM3BoiTOa+z91V9IID2xJDU7NbUgtQgmy8TBKdXAePD+ lcoI9vOPaj3CDFKNqhQndq/dMP+EpO2CXXM0HzpYtB9LnfWfcVrzh+WLHt2aFNh9/eAR/7sO e/t6D0ov73rfY9Gwk8P8ZpjS1LoNqkGZL97mbPvKfG3BjbUCmnIsRxZfeeepsj7hiKqR7ffM FX83m0kkJVW0rj3o3sDVuLjlGvdrIaMVwUosxRmJhlrMRcWJAPR1F83fAQAA X-TM-AS-MML: No Cc: dh09.lee@samsung.com, Kyungmin Park Subject: [U-Boot] [PATCH 1/2] video:cache:fix: Buffer alignment and dcache flush for lcd subsystem 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 This commit makes the video subsystem code cache aware. Memory allocated for decompressed BMP memory is now cache line aligned. Flushing of the dcache is also performed after copying BMP data to fb address. Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Anatolij Gustschin --- common/cmd_bmp.c | 2 +- common/lcd.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c index b8809e3..7d3f45a 100644 --- a/common/cmd_bmp.c +++ b/common/cmd_bmp.c @@ -54,7 +54,7 @@ bmp_image_t *gunzip_bmp(unsigned long addr, unsigned long *lenp) * Decompress bmp image */ len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE; - dst = malloc(CONFIG_SYS_VIDEO_LOGO_MAX_SIZE); + dst = memalign(CONFIG_SYS_CACHELINE_SIZE, len); if (dst == NULL) { puts("Error: malloc in gunzip failed!\n"); return NULL; diff --git a/common/lcd.c b/common/lcd.c index 506a138..b092a11 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -802,6 +802,9 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } fb -= (lcd_line_length + width * (bpix / 8)); } + flush_dcache_range((unsigned long) fb, + (unsigned long) fb + + (lcd_line_length * height)); break; #endif /* CONFIG_BMP_32BPP */ default: