U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Fan <van.freenix@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] video: mxsfb: Fix reset hang when videomode variable is not present
Date: Wed, 22 Feb 2017 17:58:55 +0800	[thread overview]
Message-ID: <20170222095853.GB9692@linux-7smt.suse> (raw)
In-Reply-To: <1487757144-11823-1-git-send-email-festevam@gmail.com>

Hi Fabio,

On Wed, Feb 22, 2017 at 06:52:24AM -0300, Fabio Estevam wrote:
>From: Fabio Estevam <fabio.estevam@nxp.com>
>
>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 video_hw_init() succeeded or not and only
>perform the LCDIF shutdown when the controller has been properly enabled.
>
>Tested on a imx7dsabresd board.
>
>Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>---
> drivers/video/mxsfb.c | 3 +++
> 1 file changed, 3 insertions(+)
>
>diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
>index 3cc03ca..83fd9aa 100644
>--- a/drivers/video/mxsfb.c
>+++ b/drivers/video/mxsfb.c
>@@ -136,6 +136,9 @@ void lcdif_power_down(void)
> 	struct mxs_lcdif_regs *regs = (struct mxs_lcdif_regs *)MXS_LCDIF_BASE;
> 	int timeout = 1000000;
> 
>+	if (!video_hw_init())
>+		return;

If videomode is set, this will reinitialize the lcdif.
Checking videomode env is ok to handle it as you proposed just now.

Regards,
Peng.

      reply	other threads:[~2017-02-22  9:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  9:52 [U-Boot] [PATCH] video: mxsfb: Fix reset hang when videomode variable is not present Fabio Estevam
2017-02-22  9:58 ` Peng Fan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170222095853.GB9692@linux-7smt.suse \
    --to=van.freenix@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox