[U-Boot] [PATCH 1/2] video:cache:fix: Proper buffer alignment for lcd subsystem

Lukasz Majewski l.majewski at samsung.com
Mon Jan 7 10:23:09 CET 2013


This commit makes the video subsystem code cache aware.
Memory allocated for decompressed BMP memory is now cache line aligned.

Tested-by: Lukasz Majewski <l.majewski at samsung.com>
Signed-off-by: Lukasz Majewski <l.majewski at samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
Cc: Anatolij Gustschin <agust at denx.de>
---
 common/cmd_bmp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_bmp.c b/common/cmd_bmp.c
index 5a52edd..57f3eb5 100644
--- a/common/cmd_bmp.c
+++ b/common/cmd_bmp.c
@@ -55,7 +55,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;
-- 
1.7.2.3



More information about the U-Boot mailing list