diff options
| author | Dhaval Patel <pdhaval@codeaurora.org> | 2014-01-30 12:54:29 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:26:12 -0700 |
| commit | ec7bbb9ef06b801bfef6dc7edd0b677381e0378f (patch) | |
| tree | a4d475ab427b20a0ac8d6b4b3e6ba5dac103fd24 | |
| parent | 7b5e32b78c14ec3a5933cc54cdb53b5fd1b8d2c7 (diff) | |
msm: mdss: fix pp setup on SSPP pipe in rotation scenario
mfd is not updated on controller when pipe is setup
for rotation scenario. However, post processing module
check it for all use cases that leads to pp update
failure SSPP pipe. This change avoids the extra checking
and allows pp module to update SSPP pipe in all use
case scenarios.
Change-Id: I8718e67ca49067c9af7b492da7cdb1344e826389
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index c269dc1fd732..8d933b43b3a3 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -816,18 +816,14 @@ static int pp_vig_pipe_setup(struct mdss_mdp_pipe *pipe, u32 *op) unsigned long flags = 0; char __iomem *offset; struct mdss_data_type *mdata; - struct msm_fb_data_type *mfd = NULL; u32 current_opmode; u32 csc_reset; + u32 dcm_state = DCM_UNINIT; pr_debug("pnum=%x\n", pipe->num); - if (!pipe->mixer || !pipe->mixer->ctl || !pipe->mixer->ctl->mfd) { - pr_err("Invalid input params for vig pipe setup\n"); - return -EINVAL; - } - - mfd = pipe->mixer->ctl->mfd; + if (!pipe->mixer && !pipe->mixer->ctl && !pipe->mixer->ctl->mfd) + dcm_state = pipe->mixer->ctl->mfd->dcm_state; mdata = mdss_mdp_get_mdata(); if ((pipe->flags & MDP_OVERLAY_PP_CFG_EN) && @@ -861,7 +857,7 @@ static int pp_vig_pipe_setup(struct mdss_mdp_pipe *pipe, u32 *op) } /* Update CSC state only if tuning mode is enable */ - if (mfd->dcm_state == DTM_ENTER) { + if (dcm_state == DTM_ENTER) { /* Reset bit 16 to 19 for CSC_STATE in VIG_OP_MODE */ csc_reset = 0xFFF0FFFF; current_opmode = readl_relaxed(pipe->base + @@ -1262,21 +1258,17 @@ int mdss_mdp_pipe_sspp_setup(struct mdss_mdp_pipe *pipe, u32 *op) char __iomem *pipe_base; u32 pipe_num; struct mdss_data_type *mdata = mdss_mdp_get_mdata(); - struct msm_fb_data_type *mfd = NULL; u32 current_opmode; + u32 dcm_state = DCM_UNINIT; if (pipe == NULL) return -EINVAL; - if (!pipe->mixer || !pipe->mixer->ctl || !pipe->mixer->ctl->mfd) { - pr_err("Invalid input params for sspp pipe setup\n"); - return -EINVAL; - } - - mfd = pipe->mixer->ctl->mfd; + if (!pipe->mixer && !pipe->mixer->ctl && !pipe->mixer->ctl->mfd) + dcm_state = pipe->mixer->ctl->mfd->dcm_state; /* Read IGC state and update the same if tuning mode is enable */ - if (mfd->dcm_state == DTM_ENTER) { + if (dcm_state == DTM_ENTER) { current_opmode = readl_relaxed(pipe->base + MDSS_MDP_REG_SSPP_SRC_OP_MODE); *op |= (current_opmode & BIT(16)); |
