Hi,

On Mon, 23 Apr 2012 10:47:10 +0900
Donghwa Lee <dh09....@samsung.com> wrote:

> This patches support drawing 32bpp bitmap TIZEN logo in exynos fb.
> asm/arch/trats_logo.h data is compressed by zip and decomressed at

Did you use "gzip" to compress the trats.bmp bitmap? I suppose so,
but "gunzip" can't uncompress it:
$ gunzip img.gz
 gzip: img.gz: unexpected end of file

"gunzip -c img.gz > trats.bmp" works and I get a 520x120 32bpp bmp
file. The size of your compressed array is 80681. Probably one or
more bytes are missing at the end. Please check/fix this.

...
> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
> index 0eb7f58..c111855 100644
> --- a/drivers/video/exynos_fb.c
> +++ b/drivers/video/exynos_fb.c
...
> @@ -67,6 +69,38 @@ static void exynos_lcd_init(vidinfo_t *vid)
>       exynos_fimd_lcd_init(vid);
>  }
>  
> +static void draw_logo(void *lcdbase)
> +{
> +     int x, y;
> +     unsigned int in_len, width, height;
> +     unsigned long out_len =
> +             (ARRAY_SIZE(trats_logo) * sizeof(*trats_logo)) + 1;

 * sizeof(*trats_logo) is not needed here, it is always 1.
Also this out_len variable should be named differently, src_len
is a better name i think.

> +     void *dst = NULL;
> +
> +     width = TRATS_LOGO_WIDTH;
> +     height = TRATS_LOGO_HEIGHT;
> +     x = ((panel_width - width) >> 1);
> +     y = ((panel_height - height) >> 1) - 5;

in your 1/2 path for common/lcd.c you are adding an
#ifndef CONFIG_EXYNOS_FB
#else
#endif

block for exynosfb specific drawing offset calculation.
The only difference is that you are using (y + height)
instead of (y + height - 1). This is not needed, just
set use "y = ((panel_height - height) >> 1) - 4;" here.

> +
> +     in_len = width * height * 8;

Please better use "in_len = CONFIG_SYS_VIDEO_LOGO_MAX_SIZE;" here
and define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE to be big enough to
contain a bitmap of your max. bitmap size (i.e. 520 * 120 * 4 +
space for bmp header/color table, so 300 KiB would be okay).

...
> diff --git a/include/configs/trats.h b/include/configs/trats.h
> index 5f913ca..b326035 100644
> --- a/include/configs/trats.h
> +++ b/include/configs/trats.h
> @@ -216,9 +216,11 @@
>  /* LCD */
>  #define CONFIG_EXYNOS_FB
>  #define CONFIG_LCD
> +#define CONFIG_CMD_BMP
>  #define CONFIG_FB_ADDR               0x52504000
>  #define CONFIG_S6E8AX0
>  #define CONFIG_EXYNOS_MIPI_DSIM
> -#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE       (1280 * 720 * 4)
> +#define CONFIG_VIDEO_BMP_GZIP
> +#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE       (500 * 120 * 4)

This should be bigger than the bitmap resolution. The bitmap file
contains the bmp header and maybe a color table, so for your current
bitmap define it to be 250000 bytes at least.

Thanks,
Anatolij
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to