diff mbox series

[U-Boot] video: mxsfb: Configure the clock after eLCDIF reset

Message ID 20191101122521.16229-1-festevam@gmail.com
State Accepted
Commit ec3dcea7447031463643c33143b3a5f027f0b54d
Delegated to: Anatolij Gustschin
Headers show
Series [U-Boot] video: mxsfb: Configure the clock after eLCDIF reset | expand

Commit Message

Fabio Estevam Nov. 1, 2019, 12:25 p.m. UTC
Running stress reboot test on a i.MX6ULL evk board with a
custom LCD can lead to splash screen failure (black screen).

After comparing the eLCDIF initialization with the Linux kernel
driver, it was noticed that the eLCDIF reset is the first operation
that needs to be done.

So do like the eLCDIF Linux driver and move the eLCDIF clock
frequency configuration after the eLCDIF reset and just prior to
setting the RUN bit.

With this change applied, no more black screen issues has been
found during overnight reboot stress tests.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
 drivers/video/mxsfb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Anatolij Gustschin Nov. 18, 2019, 10:41 a.m. UTC | #1
On Fri,  1 Nov 2019 09:25:21 -0300
Fabio Estevam festevam@gmail.com wrote:
...
>  drivers/video/mxsfb.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Applied to u-boot-video, thanks!

--
Anatolij
diff mbox series

Patch

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 6922a130c6..fcdf29be5e 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -57,9 +57,6 @@  static void mxs_lcd_init(u32 fb_addr, struct ctfb_res_modes *mode, int bpp)
 	uint32_t word_len = 0, bus_width = 0;
 	uint8_t valid_data = 0;
 
-	/* Kick in the LCDIF clock */
-	mxs_set_lcdclk(MXS_LCDIF_BASE, PS2KHZ(mode->pixclock));
-
 	/* Restart the LCDIF block */
 	mxs_reset_block(&regs->hw_lcdif_ctrl_reg);
 
@@ -130,6 +127,9 @@  static void mxs_lcd_init(u32 fb_addr, struct ctfb_res_modes *mode, int bpp)
 	/* FIFO cleared */
 	writel(LCDIF_CTRL1_FIFO_CLEAR, &regs->hw_lcdif_ctrl1_clr);
 
+	/* Kick in the LCDIF clock */
+	mxs_set_lcdclk(MXS_LCDIF_BASE, PS2KHZ(mode->pixclock));
+
 	/* RUN! */
 	writel(LCDIF_CTRL_RUN, &regs->hw_lcdif_ctrl_set);
 }