From 2740e5de4f3cd0aa36efcfe1a995fb6e3858cc97 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Tue, 29 Oct 2013 15:46:21 -0200 Subject: video: ipu_disp: Fix clock polarity logic Currently the HDMI splash screen image quality on mx6solo does not show a very stable image. By comparing the IPU driver from U-boot with the one from FSL 4.1.0 BSP, we can see that there is an inverted logic for setting the DI_GEN_POL_CLK bit. >From FSL BSP [1] we have: if (!sig.clk_pol) di_gen |= DI_GEN_POLARITY_DISP_CLK; Applying the same logic into U-boot fixes the HDMI image stability. [1] git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/mxc/ipu3/ipu_disp.c?h=imx_3.0.35_4.1.0 Signed-off-by: Fabio Estevam Tested-by: Eric Nelson Acked-by: Eric Nelson Acked-by: Stefano Babic --- drivers/video/ipu_disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c index 2e913561d0..22ac1429ba 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; } -- cgit v1.2.1 From 45ae2546ef157b647d8684845c6554283b80be92 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 22 Oct 2013 11:06:06 +0200 Subject: video, cfb_console: make background and foreground color configurable make CONSOLE_BG_COL/CONSOLE_FG_COL configurable through board config file. Clear video screen in video_init(). Signed-off-by: Heiko Schocher Cc: Anatolij Gustschin --- drivers/video/cfb_console.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'drivers') diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index a2946c71f6..6db4073596 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 -} -- cgit v1.2.1 From 1c6e9de53ba47afacd26fb784818aeb63a01baad Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Tue, 22 Oct 2013 11:06:24 +0200 Subject: video, formike: change tag/val write write first the "tag" 8 bit value and then the "val" 8-bit to the display. Tested on the rut board. Signed-off-by: Heiko Schocher Cc: Anatolij Gustschin --- drivers/video/formike.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/video/formike.c b/drivers/video/formike.c index b9b6822138..138315843f 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); -- cgit v1.2.1