public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] video:cache:fix: Buffer alignment and dcache flush for lcd subsystem
@ 2012-08-08 15:10 Lukasz Majewski
  2012-08-08 15:10 ` [U-Boot] [PATCH 2/2] video:trats:logo: Make tizen_hd_logo cache line aligned Lukasz Majewski
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Lukasz Majewski @ 2012-08-08 15:10 UTC (permalink / raw)
  To: u-boot

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 <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Anatolij Gustschin <agust@denx.de>
---
 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:
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-01-06 23:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-08 15:10 [U-Boot] [PATCH 1/2] video:cache:fix: Buffer alignment and dcache flush for lcd subsystem Lukasz Majewski
2012-08-08 15:10 ` [U-Boot] [PATCH 2/2] video:trats:logo: Make tizen_hd_logo cache line aligned Lukasz Majewski
2012-08-08 15:24 ` [U-Boot] [PATCH 1/2] video:cache:fix: Buffer alignment and dcache flush for lcd subsystem Mike Frysinger
2012-08-09  7:14   ` Lukasz Majewski
2013-01-02 16:25 ` [U-Boot] [PATCH RESEND] " Lukasz Majewski
2013-01-05  1:25   ` Simon Glass
2013-01-06  8:03     ` Lukasz Majewski
2013-01-06 15:47       ` Simon Glass
2013-01-06 20:21         ` Wolfgang Denk
2013-01-06 21:38           ` Simon Glass
2013-01-06 23:40             ` Wolfgang Denk
2013-01-06 23:09           ` Anatolij Gustschin
2013-01-06 22:54         ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox