* [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected
@ 2013-09-11 19:54 Fabio Estevam
2013-09-11 20:44 ` Eric Bénard
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2013-09-11 19:54 UTC (permalink / raw)
To: u-boot
Since commit d9b894603 (mx6sabresd: Add LVDS splash screen support) the
following hang happens if the HDMI cable is not connected or the 'panel'
variable is not set:
U-Boot 2013.10-rc2-12978-g47ac53d-dirty (Sep 11 2013 - 15:07:38)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: POR
Board: MX6-SabreSD
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
...
Provide a detect_lvds() to avoid the hang.
Reported-by: Pardeep Kumar Singla <b45784@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
board/freescale/mx6sabresd/mx6sabresd.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index c832bd9..e514529 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -263,6 +263,12 @@ static void enable_lvds(struct display_info_t const *dev)
IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT;
writel(reg, &iomux->gpr[2]);
}
+
+static int detect_lvds(struct display_info_t const *dev)
+{
+ return 0;
+}
+
static struct display_info_t const displays[] = {{
.bus = -1,
.addr = 0,
@@ -287,7 +293,7 @@ static struct display_info_t const displays[] = {{
.bus = -1,
.addr = 0,
.pixfmt = IPU_PIX_FMT_LVDS666,
- .detect = NULL,
+ .detect = detect_lvds,
.enable = enable_lvds,
.mode = {
.name = "Hannstar-XGA",
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected
2013-09-11 19:54 [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected Fabio Estevam
@ 2013-09-11 20:44 ` Eric Bénard
2013-09-11 21:12 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Eric Bénard @ 2013-09-11 20:44 UTC (permalink / raw)
To: u-boot
Hi Fabio,
Le Wed, 11 Sep 2013 16:54:10 -0300,
Fabio Estevam <fabio.estevam@freescale.com> a ?crit :
> Since commit d9b894603 (mx6sabresd: Add LVDS splash screen support) the
> following hang happens if the HDMI cable is not connected or the 'panel'
> variable is not set:
>
> U-Boot 2013.10-rc2-12978-g47ac53d-dirty (Sep 11 2013 - 15:07:38)
>
> CPU: Freescale i.MX6Q rev1.2 at 792 MHz
> Reset cause: POR
> Board: MX6-SabreSD
> DRAM: 1 GiB
> MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
> ...
>
> Provide a detect_lvds() to avoid the hang.
>
> Reported-by: Pardeep Kumar Singla <b45784@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> board/freescale/mx6sabresd/mx6sabresd.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
> index c832bd9..e514529 100644
> --- a/board/freescale/mx6sabresd/mx6sabresd.c
> +++ b/board/freescale/mx6sabresd/mx6sabresd.c
> @@ -263,6 +263,12 @@ static void enable_lvds(struct display_info_t const *dev)
> IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT;
> writel(reg, &iomux->gpr[2]);
> }
> +
> +static int detect_lvds(struct display_info_t const *dev)
> +{
> + return 0;
> +}
> +
> static struct display_info_t const displays[] = {{
> .bus = -1,
> .addr = 0,
> @@ -287,7 +293,7 @@ static struct display_info_t const displays[] = {{
> .bus = -1,
> .addr = 0,
> .pixfmt = IPU_PIX_FMT_LVDS666,
> - .detect = NULL,
> + .detect = detect_lvds,
> .enable = enable_lvds,
> .mode = {
> .name = "Hannstar-XGA",
instead of providing an empty function you could fix the problem in the
code calling this function by changing
if (dev->detect(dev))
to something like
if (dev->detect && dev->detect(dev))
Eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected
2013-09-11 20:44 ` Eric Bénard
@ 2013-09-11 21:12 ` Fabio Estevam
0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2013-09-11 21:12 UTC (permalink / raw)
To: u-boot
On Wed, Sep 11, 2013 at 5:44 PM, Eric B?nard <eric@eukrea.com> wrote:
> instead of providing an empty function you could fix the problem in the
> code calling this function by changing
> if (dev->detect(dev))
> to something like
> if (dev->detect && dev->detect(dev))
Thanks, Eric. This is a better solution.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-11 21:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-11 19:54 [U-Boot] [PATCH] mx6sabresd: Avoid hang when HDMI cable is not connected Fabio Estevam
2013-09-11 20:44 ` Eric Bénard
2013-09-11 21:12 ` Fabio Estevam
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.