From d2cd09bb44452b89c6a5478ced61ccfd96e31cfd Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Mon, 18 Sep 2017 15:25:57 +0800 Subject: board: sama5d2_xplained: Convert to CONFIG_DM_VIDEO Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/sama5d2_xplained.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include') diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h index 4f24a56899..545ba1740d 100644 --- a/include/configs/sama5d2_xplained.h +++ b/include/configs/sama5d2_xplained.h @@ -35,18 +35,6 @@ #define CONFIG_SF_DEFAULT_SPEED 30000000 #endif -/* LCD */ - -#ifdef CONFIG_LCD -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 24 -#define CONFIG_LCD_LOGO -#define CONFIG_LCD_INFO -#define CONFIG_LCD_INFO_BELOW_LOGO -#define CONFIG_ATMEL_HLCD -#define CONFIG_ATMEL_LCD_RGB565 -#endif - #ifdef CONFIG_SD_BOOT /* bootstrap + u-boot + env in sd card */ -- cgit From fe32c6d159177e5ea184f5ae598babf32a360f31 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Mon, 18 Sep 2017 15:25:58 +0800 Subject: board: sama5d3xek: Convert to CONFIG_DM_VIDEO Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/sama5d3xek.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h index bd93a1e84c..9ec1e76052 100644 --- a/include/configs/sama5d3xek.h +++ b/include/configs/sama5d3xek.h @@ -28,15 +28,6 @@ */ #define ATMEL_PMC_UHP (1 << 6) -/* LCD */ -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 24 -#define CONFIG_LCD_LOGO -#define CONFIG_LCD_INFO -#define CONFIG_LCD_INFO_BELOW_LOGO -#define CONFIG_ATMEL_HLCD -#define CONFIG_ATMEL_LCD_RGB565 - /* board specific (not enough SRAM) */ #define CONFIG_SAMA5D3_LCD_BASE 0x23E00000 -- cgit From 4b0467db538cc60fa02d448ed0758247d4607c63 Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Mon, 18 Sep 2017 15:25:59 +0800 Subject: board: sama5d4ek: Convert to CONFIG_DM_VIDEO Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/sama5d4ek.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include') diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h index 94e8e893c0..a46e3508bf 100644 --- a/include/configs/sama5d4ek.h +++ b/include/configs/sama5d4ek.h @@ -45,15 +45,6 @@ #define CONFIG_ATMEL_NAND_HW_PMECC #endif -/* LCD */ -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 18 -#define CONFIG_LCD_LOGO -#define CONFIG_LCD_INFO -#define CONFIG_LCD_INFO_BELOW_LOGO -#define CONFIG_ATMEL_HLCD -#define CONFIG_ATMEL_LCD_RGB565 - /* SPL */ #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_TEXT_BASE 0x200000 -- cgit From e974b08119348ec19c44ffcb1d4184fac9ea707b Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Mon, 18 Sep 2017 15:26:00 +0800 Subject: board: sama5d4_xplained: Convert to CONFIG_DM_VIDEO Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/sama5d4_xplained.h | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'include') diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h index 5dc5e7dd0c..6aa4bcc5c5 100644 --- a/include/configs/sama5d4_xplained.h +++ b/include/configs/sama5d4_xplained.h @@ -47,17 +47,6 @@ #define CONFIG_ATMEL_NAND_HW_PMECC #endif -/* LCD */ -#ifdef CONFIG_LCD -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 24 -#define CONFIG_LCD_LOGO -#define CONFIG_LCD_INFO -#define CONFIG_LCD_INFO_BELOW_LOGO -#define CONFIG_ATMEL_HLCD -#define CONFIG_ATMEL_LCD_RGB565 -#endif - /* SPL */ #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_TEXT_BASE 0x200000 -- cgit From 40f3429415292566af97720d781263b27bbcaeeb Mon Sep 17 00:00:00 2001 From: Wenyou Yang Date: Mon, 18 Sep 2017 15:26:01 +0800 Subject: board: at91sam9x5ek: Convert to CONFIG_DM_VIDEO Convert the board to support the video driver model, add the device tree node, and remove the unnecessary code. Signed-off-by: Wenyou Yang Reviewed-by: Simon Glass --- include/configs/at91sam9x5ek.h | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'include') diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h index 1d4971c59f..9450784521 100644 --- a/include/configs/at91sam9x5ek.h +++ b/include/configs/at91sam9x5ek.h @@ -23,16 +23,6 @@ /* general purpose I/O */ #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ -/* LCD */ -#define LCD_BPP LCD_COLOR16 -#define LCD_OUTPUT_BPP 24 -#define CONFIG_LCD_LOGO -#define CONFIG_LCD_INFO -#define CONFIG_LCD_INFO_BELOW_LOGO -#define CONFIG_ATMEL_HLCD -#define CONFIG_ATMEL_LCD_RGB565 - - /* * BOOTP options */ -- cgit From a085aa1f2737baf60d322296f02c066ee3c6a53e Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Wed, 13 Sep 2017 18:12:21 -0400 Subject: dm: video: Add basic ANSI escape sequence support Really just the subset that is needed by efi_console. Perhaps more will be added later, for example color support would be useful to implement efi_cout_set_attribute(). Signed-off-by: Rob Clark Reviewed-by: Simon Glass --- include/video.h | 7 +++++++ include/video_console.h | 11 +++++++++++ 2 files changed, 18 insertions(+) (limited to 'include') diff --git a/include/video.h b/include/video.h index 5b4e78b182..61ff653121 100644 --- a/include/video.h +++ b/include/video.h @@ -114,6 +114,13 @@ struct video_ops { */ int video_reserve(ulong *addrp); +/** + * video_clear() - Clear a device's frame buffer to background color. + * + * @dev: Device to clear + */ +void video_clear(struct udevice *dev); + /** * video_sync() - Sync a device's frame buffer with its hardware * diff --git a/include/video_console.h b/include/video_console.h index 26047934da..9dce234bd9 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -29,6 +29,9 @@ * @xsize_frac: Width of the display in fractional units * @xstart_frac: Left margin for the text console in fractional units * @last_ch: Last character written to the text console on this line + * @escape: TRUE if currently accumulating an ANSI escape sequence + * @escape_len: Length of accumulated escape sequence so far + * @escape_buf: Buffer to accumulate escape sequence */ struct vidconsole_priv { struct stdio_dev sdev; @@ -42,6 +45,14 @@ struct vidconsole_priv { int xsize_frac; int xstart_frac; int last_ch; + /* + * ANSI escape sequences are accumulated character by character, + * starting after the ESC char (0x1b) until the entire sequence + * is consumed at which point it is acted upon. + */ + int escape; + int escape_len; + char escape_buf[32]; }; /** -- cgit