diff options
Diffstat (limited to 'board/bf548-ezkit/video.c')
-rw-r--r-- | board/bf548-ezkit/video.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c index 9bcf935..6737ac1 100644 --- a/board/bf548-ezkit/video.c +++ b/board/bf548-ezkit/video.c @@ -18,11 +18,15 @@ #include <linux/types.h> #include <stdio_dev.h> +#include <lzma/LzmaTypes.h> +#include <lzma/LzmaDec.h> +#include <lzma/LzmaTools.h> + #define DMA_SIZE16 2 #include <asm/mach-common/bits/eppi.h> -#include <asm/bfin_logo_230x230.h> +#include EASYLOGO_HEADER #define LCD_X_RES 480 /*Horizontal Resolution */ #define LCD_Y_RES 272 /* Vertical Resolution */ @@ -303,13 +307,23 @@ int drv_video_init(void) #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); |