X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fcm-bf548%2Fvideo.c;h=b098615d4c04a2f71e611a08f6e0d87a8efca07f;hb=316328f59d5bb64ed8ab70b68edb434cae70ee58;hp=4703098149590df0487ff13d3744d1d47145dc70;hpb=e67f46286440a53fb1d693152667ea3b1a6b3060;p=u-boot diff --git a/board/cm-bf548/video.c b/board/cm-bf548/video.c index 4703098149..b098615d4c 100644 --- a/board/cm-bf548/video.c +++ b/board/cm-bf548/video.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -18,13 +19,15 @@ #include #include -#ifdef CONFIG_VIDEO +#include +#include +#include #define DMA_SIZE16 2 #include -#include +#include EASYLOGO_HEADER #define LCD_X_RES 480 /*Horizontal Resolution */ #define LCD_Y_RES 272 /* Vertical Resolution */ @@ -280,14 +283,6 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) } -void video_putc(const char c) -{ -} - -void video_puts(const char *s) -{ -} - int drv_video_init(void) { int error, devices = 1; @@ -303,16 +298,27 @@ int drv_video_init(void) printf("Failed to alloc FB memory\n"); return -1; } + #ifdef EASYLOGO_ENABLE_GZIP unsigned char *data = EASYLOGO_DECOMP_BUFFER; unsigned long src_len = EASYLOGO_ENABLE_GZIP; - if (gunzip(data, bfin_logo.size, bfin_logo.data, &src_len)) { + error = gunzip(data, bfin_logo.size, bfin_logo.data, &src_len); + bfin_logo.data = data; +#elif defined(EASYLOGO_ENABLE_LZMA) + unsigned char *data = EASYLOGO_DECOMP_BUFFER; + SizeT lzma_len = bfin_logo.size; + error = lzmaBuffToBuffDecompress(data, &lzma_len, + bfin_logo.data, EASYLOGO_ENABLE_LZMA); + bfin_logo.data = data; +#else + error = 0; +#endif + + if (error) { puts("Failed to decompress logo\n"); free(dst); return -1; } - bfin_logo.data = data; -#endif memset(dst + ACTIVE_VIDEO_MEM_OFFSET, bfin_logo.data[0], fbmem_size - ACTIVE_VIDEO_MEM_OFFSET); @@ -328,12 +334,8 @@ int drv_video_init(void) strcpy(videodev.name, "video"); videodev.ext = DEV_EXT_VIDEO; /* Video extensions */ videodev.flags = DEV_FLAGS_SYSTEM; /* No Output */ - videodev.putc = video_putc; /* 'putc' function */ - videodev.puts = video_puts; /* 'puts' function */ error = stdio_register(&videodev); return (error == 0) ? devices : error; } - -#endif