Skip to contentSkip to conversation

lcd: Fix build error with CONFIG_LCD_BMP_RLE8

PATCH New Simon Glass 2 participants 2 messages Oct 15, 2014 – Oct 16, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lcd: Fix build error with CONFIG_LCD_BMP_RLE8

Add a block to avoid a build error with the variable declaration. Enable the option on sandbox to prevent an error being introduced in future.

---

 common/lcd.c              | 4 ++--
 include/configs/sandbox.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
common/lcd.c +2 -2
index 217ec9d..689d30e 100644
@@ -1023,7 +1023,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 
 	switch (bmp_bpix) {
 	case 1: /* pass through */
-	case 8:
+	case 8: {
 #ifdef CONFIG_LCD_BMP_RLE8
 		u32 compression = get_unaligned_le32(&bmp->header.compression);
 		if (compression == BMP_BI_RLE8) {
@@ -1056,7 +1056,7 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
 			fb -= byte_width + lcd_line_length;
 		}
 		break;
-
+	}
 #if defined(CONFIG_BMP_16BPP)
 	case 16:
 		for (i = 0; i < height; ++i) {
include/configs/sandbox.h +1 -0
index 6972643..022629f 100644
@@ -172,6 +172,7 @@
 #define CONFIG_CONSOLE_MUX
 #define CONFIG_SYS_CONSOLE_IS_IN_ENV
 #define LCD_BPP			LCD_COLOR16
+#define CONFIG_LCD_BMP_RLE8
 
 #define CONFIG_CROS_EC_KEYB
 #define CONFIG_KEYBOARD
Signature · 1 line
2.1.0.rc2.206.gedb03e5
#1 lore raw

PATCH 1/1 lcd: Fix build error with CONFIG_LCD_BMP_RLE8

Hi Simon,

Quoted 10 lines · On Wed, 15 Oct 2014 04:53:04 -0600 Simon Glass <[email protected]> wrote:

Add a block to avoid a build error with the variable declaration. Enable the option on sandbox to prevent an error being introduced in future.

---

 common/lcd.c              | 4 ++--
 include/configs/sandbox.h | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

Applied to u-boot-video/master.

Thanks,

Anatolij