mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: Fix display corruption with continuous splash screen feature
During boot up, we observe random lines on screen between the splash_screen image and the android animation. MDP clocks were turned off during bootup. Fix this issue by enabling the clocks when this feature is enabled. Add check to see that the video mode engine is not busy before turning off the dsi controller to avoid any underruns. CRs-Fixed: 399634 Change-Id: I8fdb50fa848362a548b8cdd53ee1817346b57716 Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
This commit is contained in:
parent
830a0a0aba
commit
ae71d63d07
3 changed files with 24 additions and 24 deletions
|
@ -2387,8 +2387,6 @@ static int mdp_probe(struct platform_device *pdev)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
mdp_clk_ctrl(1);
|
||||
|
||||
mdp_hw_version();
|
||||
|
||||
/* initializing mdp hw */
|
||||
|
@ -2402,8 +2400,6 @@ static int mdp_probe(struct platform_device *pdev)
|
|||
#ifdef CONFIG_FB_MSM_OVERLAY
|
||||
mdp_hw_cursor_init();
|
||||
#endif
|
||||
mdp_clk_ctrl(0);
|
||||
|
||||
mdp_resource_initialized = 1;
|
||||
return 0;
|
||||
}
|
||||
|
@ -2438,6 +2434,7 @@ static int mdp_probe(struct platform_device *pdev)
|
|||
mfd->panel.type == LCDC_PANEL)
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK,
|
||||
MDP_BLOCK_POWER_ON, FALSE);
|
||||
mdp_clk_ctrl(1);
|
||||
contSplash_update_done = 1;
|
||||
}
|
||||
} else
|
||||
|
|
|
@ -526,6 +526,9 @@ int mdp4_dsi_video_on(struct platform_device *pdev)
|
|||
mdp4_dsi_video_wait4dmap_done(0);
|
||||
MDP_OUTP(MDP_BASE + DSI_VIDEO_BASE, 0);
|
||||
mipi_dsi_controller_cfg(0);
|
||||
/* Clks are enabled in probe.
|
||||
Disabling clocks now */
|
||||
mdp_clk_ctrl(0);
|
||||
}
|
||||
|
||||
pipe->src_height = fbi->var.yres;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include <linux/uaccess.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/iopoll.h>
|
||||
|
||||
#include <asm/system.h>
|
||||
#include <asm/mach-types.h>
|
||||
|
@ -949,31 +950,30 @@ void mipi_dsi_controller_cfg(int enable)
|
|||
|
||||
uint32 dsi_ctrl;
|
||||
uint32 status;
|
||||
int cnt;
|
||||
u32 sleep_us = 1000;
|
||||
u32 timeout_us = 16000;
|
||||
|
||||
cnt = 16;
|
||||
while (cnt--) {
|
||||
status = MIPI_INP(MIPI_DSI_BASE + 0x0004);
|
||||
status &= 0x02; /* CMD_MODE_DMA_BUSY */
|
||||
if (status == 0)
|
||||
break;
|
||||
usleep(1000);
|
||||
}
|
||||
if (cnt == 0)
|
||||
/* Check for CMD_MODE_DMA_BUSY */
|
||||
if (readl_poll_timeout((MIPI_DSI_BASE + 0x0004),
|
||||
status,
|
||||
((status & 0x02) == 0),
|
||||
sleep_us, timeout_us))
|
||||
pr_info("%s: DSI status=%x failed\n", __func__, status);
|
||||
|
||||
cnt = 16;
|
||||
while (cnt--) {
|
||||
status = MIPI_INP(MIPI_DSI_BASE + 0x0008);
|
||||
status &= 0x11111000; /* x_HS_FIFO_EMPTY */
|
||||
if (status == 0x11111000) /* all empty */
|
||||
break;
|
||||
usleep(1000);
|
||||
}
|
||||
|
||||
if (cnt == 0)
|
||||
/* Check for x_HS_FIFO_EMPTY */
|
||||
if (readl_poll_timeout((MIPI_DSI_BASE + 0x0008),
|
||||
status,
|
||||
((status & 0x11111000) == 0x11111000),
|
||||
sleep_us, timeout_us))
|
||||
pr_info("%s: FIFO status=%x failed\n", __func__, status);
|
||||
|
||||
/* Check for VIDEO_MODE_ENGINE_BUSY */
|
||||
if (readl_poll_timeout((MIPI_DSI_BASE + 0x0004),
|
||||
status,
|
||||
((status & 0x08) == 0),
|
||||
sleep_us, timeout_us))
|
||||
pr_info("%s: DSI status=%x failed\n", __func__, status);
|
||||
|
||||
dsi_ctrl = MIPI_INP(MIPI_DSI_BASE + 0x0000);
|
||||
if (enable)
|
||||
dsi_ctrl |= 0x01;
|
||||
|
|
Loading…
Reference in a new issue