summaryrefslogtreecommitdiff
path: root/drivers/mxc
diff options
context:
space:
mode:
authorLiu Ying <victor.liu@nxp.com>2019-03-12 10:38:01 +0800
committerLiu Ying <victor.liu@nxp.com>2019-03-12 14:38:28 +0800
commit11ab612b10bb068cea0a511865a79eb510248f7c (patch)
tree3f178a5e5e7506c71a8497cc2bf98be40d67580e /drivers/mxc
parent176f72cb5dc0ed96d0ca9e9fa847df362ab55754 (diff)
MLK-21105 IPUv3: disp: Explicitly clear DI_GEN_POLARITY_DISP_CLK when necessary
The IPUv3 fb driver would call ipu_init_sync_panel() to enable a display. It reads the DI_GENERAL register first and sets the bit DI_GEN_POLARITY_DISP_CLK to high if sig.clk_pol is false. This assumes no one else would program the bit and the pixel clock polarity never changes(which is usually the case). However, the commit mentioned below sets the bit to high in ipu_uninit_sync_panel() when a display is disabled, in order to avoid power leakage for display pins. This would keep the bit being high as long as the display was disabled since the system is actively running. This patch explicitly clears the bit when necessary to fix the issue. Tests are done for CLAA-WVGA parallel LCD panel, SEIKO-WVGA parallel LCD panel, Hannstar XGA LVDS panel(LVDS0 and LVDS1), HIMAX WVGA MIPI DSI panel and native HDMI output on i.MX6q SabreSD board. Fixes: 9afd177e7524 ("ENGR00141552 ipuv3: fix display pin's power leak") Signed-off-by: Liu Ying <victor.liu@nxp.com> (cherry picked from commit 02db8c7829d72bd45967d866965a17d818b9cc57)
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index f2ccb1e3a137..c4e3fa051c47 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -1,5 +1,6 @@
/*
* Copyright 2005-2015 Freescale Semiconductor, Inc. All Rights Reserved.
+ * Copyright 2019 NXP
*/
/*
@@ -1557,6 +1558,8 @@ int32_t ipu_init_sync_panel(struct ipu_soc *ipu, int disp, uint32_t pixel_clk,
if (!sig.clk_pol)
di_gen |= DI_GEN_POLARITY_DISP_CLK;
+ else
+ di_gen &= ~DI_GEN_POLARITY_DISP_CLK;
ipu_di_write(ipu, disp, di_gen, DI_GENERAL);