From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anatolij Gustschin Date: Mon, 30 Apr 2012 12:14:03 +0200 Subject: [U-Boot] [PATCH v2 3/3] EXYNOS: display 32bpp bitmap TIZEN logo In-Reply-To: <4F990583.6090905@samsung.com> References: <4F990583.6090905@samsung.com> Message-ID: <20120430121403.1d7b4ab8@wker> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Thu, 26 Apr 2012 17:21:23 +0900 Donghwa Lee 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/