[U-Boot] [PATCH v2 3/3] EXYNOS: display 32bpp bitmap TIZEN logo

Anatolij Gustschin agust at denx.de
Mon Apr 30 12:14:03 CEST 2012


Hi,

On Thu, 26 Apr 2012 17:21:23 +0900
Donghwa Lee <dh09.lee at samsung.com> wrote:
...
> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
> index 96a8ec1..f669b65 100644
> --- a/drivers/video/exynos_fb.c
> +++ b/drivers/video/exynos_fb.c
...
> @@ -64,6 +68,29 @@ static void exynos_lcd_init(vidinfo_t *vid)
>  	exynos_fimd_lcd_init(vid);
>  }
>  
> +static void draw_logo(void)
> +{
> +	int x, y;
> +	bmp_image_t *bmp;
> +	ulong addr, len;
> +	unsigned int logo_width, logo_height;
> +
> +	logo_width = panel_info.logo_width;
> +	logo_height = panel_info.logo_height;
> +	x = ((panel_width - logo_width) >> 1);
> +	y = ((panel_height - logo_height) >> 1) - 4;
> +
> +	addr = (ulong)logo;
> +	bmp = (bmp_image_t *)addr;
> +
> +	if (!((bmp->header.signature[0] =='B') &&
> +		      (bmp->header.signature[1] =='M'))) {
> +			addr = (ulong)gunzip_bmp(addr, &len);
> +	}
> +
> +	lcd_display_bitmap((ulong)addr, x, y);

Here freeing the buffer allocated by gunzip_bmp() is needed. But I think
that we should better use bmp_display((ulong)addr, x, y) here to reuse
the existing code. I've sent a patch [1] making bmp_display() non static,
so please use bmp_display() here.

Thanks,
Anatolij

[1] http://patchwork.ozlabs.org/patch/155490/


More information about the U-Boot mailing list