video: mxsfb: Fix reset hang when videomode variable is not present
Subsystems (2)
Fabio Estevam
reviewerPATCH v2 1/1 video: mxsfb: Fix reset hang when videomode variable is not present
From: Fabio Estevam <[email protected]>
Currently the system hangs when the 'videomode' variable is not present:
=> 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 'videomode' variable is present and in case it is not present, do not continue with the LCDIF powerdown sequence.
Tested on a imx7dsabresd board.
---
Changes since v1:
- Only check videomode variable to avoid LCDIF to initialize again.
drivers/video/mxsfb.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/video/mxsfb.c +5 -0
@@ -135,6 +135,11 @@ void lcdif_power_down(void) {struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE ;int timeout =1000000 ; +char *penv; + + penv =getenv ("videomode" ); +if (!penv) +return ;writel (panel.frameAdrs, ®s->hw_lcdif_cur_buf_reg);writel (panel.frameAdrs, ®s->hw_lcdif_next_buf_reg);
Signature · 1 line
2.7.4
PATCH v2 1/1 video: mxsfb: Fix reset hang when videomode variable is not present
Hi Fabio,
On Wed, 22 Feb 2017 07:09:46 -0300
Fabio Estevam festevam at gmail.com wrote:
...
drivers/video/mxsfb.c void lcdif_power_down(void) · line 142
Quoted 9 lines
drivers/video/mxsfb.c +5
-0@@ -135,6 +135,11 @@ void lcdif_power_down(void) {struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE ;int timeout =1000000 ; +char *penv; + + penv =getenv ("videomode" ); +if (!penv) +return ;
will a simple check of frameAdrs fix this problem?
Like:
if (!panel.frameAdrs) return;
Thanks,
Anatolij
Fabio Estevam
reviewerPATCH v2 1/1 video: mxsfb: Fix reset hang when videomode variable is not present
Hi Anatolij,
Quoted 5 lines · Anatolij Gustschin
will a simple check of frameAdrs fix this problem?
Like:
if (!panel.frameAdrs) return;
Yes, it does! Thanks for the suggestion.