diff options
-rw-r--r-- | README | 5 | ||||
-rw-r--r-- | drivers/video/cfb_console.c | 38 | ||||
-rw-r--r-- | drivers/video/formike.c | 7 | ||||
-rw-r--r-- | drivers/video/ipu_disp.c | 2 | ||||
-rw-r--r-- | include/video_fb.h | 5 |
5 files changed, 35 insertions, 22 deletions
@@ -705,6 +705,11 @@ The following options need to be configured: the "silent" environment variable. See doc/README.silent for more information. + CONFIG_SYS_CONSOLE_BG_COL: define the backgroundcolor, default + is 0x00. + CONFIG_SYS_CONSOLE_FG_COL: define the foregroundcolor, default + is 0xa0. + - Console Baudrate: CONFIG_BAUDRATE - in bps Select one of the baudrates listed in diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index a2946c7..6db4073 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -2108,6 +2108,24 @@ defined(CONFIG_SANDBOX) || defined(CONFIG_X86) return 0; } +void video_clear(void) +{ + if (!video_fb_address) + return; +#ifdef VIDEO_HW_RECTFILL + video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */ + 0, /* dest pos x */ + 0, /* dest pos y */ + VIDEO_VISIBLE_COLS, /* frame width */ + VIDEO_VISIBLE_ROWS, /* frame height */ + bgx /* fill color */ + ); +#else + memsetl(video_fb_address, + (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx); +#endif +} + static int video_init(void) { unsigned char color8; @@ -2194,6 +2212,8 @@ static int video_init(void) } eorx = fgx ^ bgx; + video_clear(); + #ifdef CONFIG_VIDEO_LOGO /* Plot the logo and get start point of console */ debug("Video: Drawing the logo ...\n"); @@ -2297,21 +2317,3 @@ int video_get_screen_columns(void) { return CONSOLE_COLS; } - -void video_clear(void) -{ - if (!video_fb_address) - return; -#ifdef VIDEO_HW_RECTFILL - video_hw_rectfill(VIDEO_PIXEL_SIZE, /* bytes per pixel */ - 0, /* dest pos x */ - 0, /* dest pos y */ - VIDEO_VISIBLE_COLS, /* frame width */ - VIDEO_VISIBLE_ROWS, /* frame height */ - bgx /* fill color */ - ); -#else - memsetl(video_fb_address, - (VIDEO_VISIBLE_ROWS * VIDEO_LINE_LEN) / sizeof(int), bgx); -#endif -} diff --git a/drivers/video/formike.c b/drivers/video/formike.c index b9b6822..1383158 100644 --- a/drivers/video/formike.c +++ b/drivers/video/formike.c @@ -27,10 +27,11 @@ static int spi_write_tag_val(struct spi_slave *spi, unsigned char tag, int ret; buf[0] = tag; - buf[1] = val; - flags |= SPI_XFER_END; + ret = spi_xfer(spi, 8, buf, NULL, flags); + buf[0] = val; + flags = SPI_XFER_END; + ret = spi_xfer(spi, 8, buf, NULL, flags); - ret = spi_xfer(spi, 16, buf, NULL, flags); #ifdef KWH043ST20_F01_SPI_DEBUG printf("spi_write_tag_val: tag=%02X, val=%02X ret: %d\n", tag, val, ret); diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c index 2e91356..22ac142 100644 --- a/drivers/video/ipu_disp.c +++ b/drivers/video/ipu_disp.c @@ -1178,7 +1178,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk, if (sig.Vsync_pol) di_gen |= DI_GEN_POLARITY_3; - if (sig.clk_pol) + if (!sig.clk_pol) di_gen |= DI_GEN_POL_CLK; } diff --git a/include/video_fb.h b/include/video_fb.h index 028e2a6..6cd4e37 100644 --- a/include/video_fb.h +++ b/include/video_fb.h @@ -18,8 +18,13 @@ #ifndef _VIDEO_FB_H_ #define _VIDEO_FB_H_ +#if defined(CONFIG_SYS_CONSOLE_FG_COL) && defined(CONFIG_SYS_CONSOLE_BG_COL) +#define CONSOLE_BG_COL CONFIG_SYS_CONSOLE_BG_COL +#define CONSOLE_FG_COL CONFIG_SYS_CONSOLE_FG_COL +#else #define CONSOLE_BG_COL 0x00 #define CONSOLE_FG_COL 0xa0 +#endif /* * Graphic Data Format (GDF) bits for VIDEO_DATA_FORMAT |