public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] mx6sabresd: Fix wrong colors in LVDS splash
@ 2013-11-25 12:34 Fabio Estevam
  2013-11-27  8:40 ` Stefano Babic
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2013-11-25 12:34 UTC (permalink / raw)
  To: u-boot

Currently HDMI splash screen is selected by default on mx6sabresd boards.

As LVDS is also enabled, this causes incorrect colors to be displayed im the 
LVDS panel.

Fix this by selecting the LVDS panel as the default splash output and only keep
HDMI or LVDS turned on at the same time.

Acked-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Disable both LDB channels

 board/freescale/mx6sabresd/mx6sabresd.c | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/board/freescale/mx6sabresd/mx6sabresd.c b/board/freescale/mx6sabresd/mx6sabresd.c
index 1ecedac..7e5bdf7 100644
--- a/board/freescale/mx6sabresd/mx6sabresd.c
+++ b/board/freescale/mx6sabresd/mx6sabresd.c
@@ -249,8 +249,22 @@ static int detect_hdmi(struct display_info_t const *dev)
 	return readb(&hdmi->phy_stat0) & HDMI_DVI_STAT;
 }
 
+
+static void disable_lvds(struct display_info_t const *dev)
+{
+	struct iomuxc *iomux = (struct iomuxc *)IOMUXC_BASE_ADDR;
+
+	int reg = readl(&iomux->gpr[2]);
+
+	reg &= ~(IOMUXC_GPR2_LVDS_CH0_MODE_MASK |
+		 IOMUXC_GPR2_LVDS_CH1_MODE_MASK);
+
+	writel(reg, &iomux->gpr[2]);
+}
+
 static void do_enable_hdmi(struct display_info_t const *dev)
 {
+	disable_lvds(dev);
 	imx_enable_hdmi_phy();
 }
 
@@ -263,14 +277,15 @@ static void enable_lvds(struct display_info_t const *dev)
 	       IOMUXC_GPR2_DATA_WIDTH_CH1_24BIT;
 	writel(reg, &iomux->gpr[2]);
 }
+
 static struct display_info_t const displays[] = {{
 	.bus	= -1,
 	.addr	= 0,
-	.pixfmt	= IPU_PIX_FMT_RGB24,
-	.detect	= detect_hdmi,
-	.enable	= do_enable_hdmi,
+	.pixfmt	= IPU_PIX_FMT_LVDS666,
+	.detect	= NULL,
+	.enable	= enable_lvds,
 	.mode	= {
-		.name           = "HDMI",
+		.name           = "Hannstar-XGA",
 		.refresh        = 60,
 		.xres           = 1024,
 		.yres           = 768,
@@ -286,11 +301,11 @@ static struct display_info_t const displays[] = {{
 } }, {
 	.bus	= -1,
 	.addr	= 0,
-	.pixfmt	= IPU_PIX_FMT_LVDS666,
-	.detect	= NULL,
-	.enable	= enable_lvds,
+	.pixfmt	= IPU_PIX_FMT_RGB24,
+	.detect	= detect_hdmi,
+	.enable	= do_enable_hdmi,
 	.mode	= {
-		.name           = "Hannstar-XGA",
+		.name           = "HDMI",
 		.refresh        = 60,
 		.xres           = 1024,
 		.yres           = 768,
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH v2] mx6sabresd: Fix wrong colors in LVDS splash
  2013-11-25 12:34 [U-Boot] [PATCH v2] mx6sabresd: Fix wrong colors in LVDS splash Fabio Estevam
@ 2013-11-27  8:40 ` Stefano Babic
  0 siblings, 0 replies; 2+ messages in thread
From: Stefano Babic @ 2013-11-27  8:40 UTC (permalink / raw)
  To: u-boot

On 25/11/2013 13:34, Fabio Estevam wrote:
> Currently HDMI splash screen is selected by default on mx6sabresd boards.
> 
> As LVDS is also enabled, this causes incorrect colors to be displayed im the 
> LVDS panel.
> 
> Fix this by selecting the LVDS panel as the default splash output and only keep
> HDMI or LVDS turned on at the same time.
> 
> Acked-by: Liu Ying <Ying.Liu@freescale.com>
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-27  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-25 12:34 [U-Boot] [PATCH v2] mx6sabresd: Fix wrong colors in LVDS splash Fabio Estevam
2013-11-27  8:40 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox