summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-11-22 16:22:38 +0800
committerLiu Ying <Ying.Liu@freescale.com>2013-11-22 17:39:22 +0800
commitb28ef7b5b7fb0bce9de6919d925b88358b77054c (patch)
treeaa0c907707bf9511caf1dad4b99f981b13cbadf5
parent94ef2ddad935c8e9ebe3e092e5c1d6ed12d92d1e (diff)
downloadu-boot-imx-b28ef7b5b7fb0bce9de6919d925b88358b77054c.zip
u-boot-imx-b28ef7b5b7fb0bce9de6919d925b88358b77054c.tar.gz
u-boot-imx-b28ef7b5b7fb0bce9de6919d925b88358b77054c.tar.bz2
ENGR00289053-1 mx6sabresd: Fix wrong colors in LVDS display
Currently HDMI splash screen is selected by default on mx6sabresd boards. As LVDS is also always enabled, this causes incorrect colors to be displayed in the LVDS panel due to the different pixel format in HDMI and LVDS. Fix this by selecting the LVDS panel as the default splash output and also by ensuring that LVDS is turned off when HDMI output is active. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Liu Ying <Ying.Liu@freescale.com> (cherry picked from commit 017bdd25b496cd26caef9f549a49d366f6eac855)
-rw-r--r--board/freescale/mx6qsabresd/mx6qsabresd.c30
1 files changed, 22 insertions, 8 deletions
diff --git a/board/freescale/mx6qsabresd/mx6qsabresd.c b/board/freescale/mx6qsabresd/mx6qsabresd.c
index d84c9bf..75f5d3a 100644
--- a/board/freescale/mx6qsabresd/mx6qsabresd.c
+++ b/board/freescale/mx6qsabresd/mx6qsabresd.c
@@ -835,8 +835,21 @@ 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();
}
@@ -849,14 +862,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,
@@ -872,11 +886,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,