
Hi Simon, Lukasz,
On Sun, 6 Jan 2013 07:47:58 -0800 Simon Glass sjg@chromium.org wrote: ...
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);
Why do you need to align this one? It is just returned to the caller, isn't it?
Yes, it is returned to the caller, but afterwards lcd_display_bitmap takes this pointer (and thereof probably unaligned buffer) and works on it. (At least in the case of trats the bmp is gzipped).
OK, so it is directly used as a frame buffer?
the allocated area isn't directly used as a frame buffer, it is a buffer for bmp image which will be processed by lcd_display_bitmap(). The latter looks at the image header/palette and fills the frame buffer (lcd_base) with the image data. This image buffer can be unaligned I think.
Thanks, Anatolij