X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=common%2Flcd.c;h=4b3d7dcd34b82bf6c0dce9409b557723372c854a;hb=75ff0578515665a1b712275deb73be29e5ad8773;hp=783626e3d54caf4fbdd4940892023a9171ded5df;hpb=0badc648dcb0d0e10db959ffe8ab1b1e156b3724;p=u-boot diff --git a/common/lcd.c b/common/lcd.c index 783626e3d5..4b3d7dcd34 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -223,7 +223,7 @@ void lcd_clear(void) /* Paint the logo and retrieve LCD base address */ debug("[LCD] Drawing the logo...\n"); if (do_splash) { - s = getenv("splashimage"); + s = env_get("splashimage"); if (s) { do_splash = 0; addr = simple_strtoul(s, NULL, 16); @@ -562,11 +562,7 @@ __weak void lcd_set_cmap(struct bmp_image *bmp, unsigned colors) *cmap = (((cte.red) << 8) & 0xf800) | (((cte.green) << 3) & 0x07e0) | (((cte.blue) >> 3) & 0x001f); -#if defined(CONFIG_MPC823) - cmap--; -#else cmap++; -#endif } } @@ -582,7 +578,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) unsigned long pwidth = panel_info.vl_col; unsigned colors, bpix, bmp_bpix; int hdr_size; - struct bmp_color_table_entry *palette = bmp->color_table; + struct bmp_color_table_entry *palette; if (!bmp || !(bmp->header.signature[0] == 'B' && bmp->header.signature[1] == 'M')) { @@ -591,6 +587,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) return 1; } + palette = bmp->color_table; width = get_unaligned_le32(&bmp->header.width); height = get_unaligned_le32(&bmp->header.height); bmp_bpix = get_unaligned_le16(&bmp->header.bit_count); @@ -704,7 +701,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) } break; #endif /* CONFIG_BMP_16BPP */ -#if defined(CONFIG_BMP_24BMP) +#if defined(CONFIG_BMP_24BPP) case 24: for (i = 0; i < height; ++i) { for (j = 0; j < width; j++) { @@ -716,7 +713,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y) fb -= lcd_line_length + width * (bpix / 8); } break; -#endif /* CONFIG_BMP_24BMP */ +#endif /* CONFIG_BMP_24BPP */ #if defined(CONFIG_BMP_32BPP) case 32: for (i = 0; i < height; ++i) {