Skip to content
Snippets Groups Projects
Commit b24cf854 authored by Fabio Estevam's avatar Fabio Estevam Committed by Anatolij Gustschin
Browse files

video: mxsfb: Fix reset hang when videomode variable is not present


Currently the system hangs when the 'videomode' variable is not present
and a reset command is issued:

=> setenv videomode
=> saveenv
=> reset

(Board hangs)

lcdif_power_down() assumes that the LCDIF controller has been properly
configured and enabled, which may not be true.

To fix this issue check whether panel.frameAdrs has been initialized and
in case it has not been initialized, do not continue with the LCDIF
powerdown sequence.

Tested on a imx7dsabresd board.

Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Acked-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 4d6f9e0d
No related branches found
No related tags found
No related merge requests found
...@@ -136,6 +136,9 @@ void lcdif_power_down(void) ...@@ -136,6 +136,9 @@ void lcdif_power_down(void)
struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE; struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
int timeout = 1000000; int timeout = 1000000;
if (!panel.frameAdrs)
return;
writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg); writel(panel.frameAdrs, &regs->hw_lcdif_cur_buf_reg);
writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg); writel(panel.frameAdrs, &regs->hw_lcdif_next_buf_reg);
writel(LCDIF_CTRL1_VSYNC_EDGE_IRQ, &regs->hw_lcdif_ctrl1_clr); writel(LCDIF_CTRL1_VSYNC_EDGE_IRQ, &regs->hw_lcdif_ctrl1_clr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment