Message ID | 1344438635-31169-1-git-send-email-l.majewski@samsung.com |
---|---|
State | Superseded |
Delegated to: | Anatolij Gustschin |
Headers | show |
On Wednesday 08 August 2012 11:10:34 Lukasz Majewski wrote: > 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. i think this is a more comprehensive fix: http://patchwork.ozlabs.org/patch/164722/ although your memalign() call might be useful to integrate into Simon's change -mike
Hi Mike, > On Wednesday 08 August 2012 11:10:34 Lukasz Majewski wrote: > > 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. > > i think this is a more comprehensive fix: > http://patchwork.ozlabs.org/patch/164722/ Yes, indeed. Thanks for pointing out. > > although your memalign() call might be useful to integrate into > Simon's change -mike I will comment the v3 patch verison.
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: