Blackfin: easylogo: add lzma logos

The bf527-ezkit boards are getting too big to fit into their reserved
flash space, so we need to use a lzma compressed logo.

Since the video driver code is very similar, add lzma compressed support
to all of the Blackfin video drivers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
master
Mike Frysinger 13 years ago
parent 66714b1a6d
commit 42c6e9ad1b
  1. 0
      arch/blackfin/include/asm/bfin_logo_230x230_gzip.h
  2. 1819
      arch/blackfin/include/asm/bfin_logo_230x230_lzma.h
  3. 0
      arch/blackfin/include/asm/bfin_logo_rgb565_230x230_gzip.h
  4. 1079
      arch/blackfin/include/asm/bfin_logo_rgb565_230x230_lzma.h
  5. 30
      board/bf527-ezkit/video.c
  6. 22
      board/bf548-ezkit/video.c
  7. 25
      board/cm-bf548/video.c
  8. 9
      include/configs/bf527-ezkit.h
  9. 1
      include/configs/bf548-ezkit.h
  10. 1
      include/configs/cm-bf548.h

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -17,6 +17,10 @@
#include <linux/types.h>
#include <stdio_dev.h>
#include <lzma/LzmaTypes.h>
#include <lzma/LzmaDec.h>
#include <lzma/LzmaTools.h>
#include <asm/mach-common/bits/ppi.h>
#include <asm/mach-common/bits/timer.h>
@ -24,12 +28,9 @@
#define LCD_Y_RES 240 /* Vertical Resolution */
#define DMA_BUS_SIZE 16
#ifdef CONFIG_BF527_EZKIT_REV_2_1 /* lq035q1 */
#include EASYLOGO_HEADER
#if !defined(CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI) && \
!defined(CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI)
# define CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
#endif
#ifdef CONFIG_BF527_EZKIT_REV_2_1 /* lq035q1 */
/* Interface 16/18-bit TFT over an 8-bit wide PPI using a
* small Programmable Logic Device (CPLD)
@ -37,14 +38,12 @@
*/
#ifdef CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
#include <asm/bfin_logo_rgb565_230x230.h>
#define LCD_BPP 16 /* Bit Per Pixel */
#define CLOCKS_PPIX 2 /* Clocks per pixel */
#define CPLD_DELAY 3 /* RGB565 pipeline delay */
#endif
#ifdef CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI
#include <asm/bfin_logo_230x230.h>
#define LCD_BPP 24 /* Bit Per Pixel */
#define CLOCKS_PPIX 3 /* Clocks per pixel */
#define CPLD_DELAY 5 /* RGB888 pipeline delay */
@ -96,7 +95,6 @@
#endif
#else /* t350mcqb */
#include <asm/bfin_logo_230x230.h>
#define LCD_BPP 24 /* Bit Per Pixel */
#define CLOCKS_PPIX 3 /* Clocks per pixel */
@ -419,13 +417,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);

@ -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);

@ -18,13 +18,15 @@
#include <linux/types.h>
#include <stdio_dev.h>
#ifdef CONFIG_VIDEO
#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,16 +305,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);
@ -335,5 +348,3 @@ int drv_video_init(void)
return (error == 0) ? devices : error;
}
#endif

@ -156,6 +156,15 @@
#ifdef CONFIG_BF527_EZKIT_REV_2_1
# define CONFIG_LQ035Q1_SPI_BUS 0
# define CONFIG_LQ035Q1_SPI_CS 7
# define CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
#else
# define CONFIG_LQ035Q1_USE_RGB888_8_BIT_PPI
#endif
#ifdef CONFIG_LQ035Q1_USE_RGB565_8_BIT_PPI
# define EASYLOGO_HEADER <asm/bfin_logo_rgb565_230x230_lzma.h>
#else
# define EASYLOGO_HEADER <asm/bfin_logo_230x230_lzma.h>
#endif

@ -188,6 +188,7 @@
/* Don't waste time transferring a logo over the UART */
# if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART)
# define CONFIG_VIDEO
# define EASYLOGO_HEADER <asm/bfin_logo_230x230_gzip.h>
# endif
# define CONFIG_DEB_DMA_URGENT
#endif

@ -122,6 +122,7 @@
/* Don't waste time transferring a logo over the UART */
# if (CONFIG_BFIN_BOOT_MODE != BFIN_BOOT_UART)
# define CONFIG_VIDEO
# define EASYLOGO_HEADER <asm/bfin_logo_230x230_gzip.h>
# endif
# define CONFIG_DEB_DMA_URGENT
#endif

Loading…
Cancel
Save