diff options
| author | Jeevan Shriram <jshriram@codeaurora.org> | 2014-08-08 15:18:07 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:33:34 -0700 |
| commit | 3cd94cabd9d751fca7ae6995175f181b85a6cc24 (patch) | |
| tree | 7811f4a6d49a0417c85a9ea341c066d406070366 /drivers/video/fbdev | |
| parent | 2d8e7786666625cf8279ab0f3f20f19c5d978717 (diff) | |
mdss: mdp: reset init phase and phase step to default
reset the init phase and phase step registers to default
when the pixel extension are not calculated in userspace.
Change-Id: I876f1628fb46901a07deb1b97a4ab55f924612b0
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 64 |
1 files changed, 51 insertions, 13 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index 016c2c078b92..79494c882462 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -1022,6 +1022,7 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) struct mdss_data_type *mdata; u32 src_w, src_h; u32 dcm_state = DCM_UNINIT; + u32 chroma_shift_x = 0, chroma_shift_y = 0; pr_debug("pipe=%d, change pxl ext=%d\n", pipe->num, pipe->scale.enable_pxl_ext); @@ -1094,11 +1095,10 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) init_phasey = pipe->scale.init_phase_y[0]; if (pipe->type == MDSS_MDP_PIPE_TYPE_VIG) { - u32 chroma_shift = 0; if (!pipe->vert_deci && ((chroma_sample == MDSS_MDP_CHROMA_420) || (chroma_sample == MDSS_MDP_CHROMA_H1V2))) - chroma_shift = 1; /* 2x upsample chroma */ + chroma_shift_y = 1; /* 2x upsample chroma */ if (src_h <= pipe->dst.h) scale_config |= /* G/Y, A */ @@ -1109,7 +1109,7 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) (MDSS_MDP_SCALE_FILTER_PCMN << 10) | (MDSS_MDP_SCALE_FILTER_PCMN << 18); - if ((src_h >> chroma_shift) <= pipe->dst.h) + if ((src_h >> chroma_shift_y) <= pipe->dst.h) scale_config |= /* CrCb */ (MDSS_MDP_SCALE_FILTER_BIL << 14); else @@ -1118,7 +1118,8 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) writel_relaxed(init_phasey, pipe->base + MDSS_MDP_REG_VIG_QSEED2_C12_INIT_PHASEY); - writel_relaxed(phasey_step >> chroma_shift, pipe->base + + writel_relaxed(phasey_step >> chroma_shift_y, + pipe->base + MDSS_MDP_REG_VIG_QSEED2_C12_PHASESTEPY); } else { if (src_h <= pipe->dst.h) @@ -1150,12 +1151,10 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) phasex_step = pipe->scale.phase_step_x[0]; if (pipe->type == MDSS_MDP_PIPE_TYPE_VIG) { - u32 chroma_shift = 0; - if (!pipe->horz_deci && ((chroma_sample == MDSS_MDP_CHROMA_420) || (chroma_sample == MDSS_MDP_CHROMA_H2V1))) - chroma_shift = 1; /* 2x upsample chroma */ + chroma_shift_x = 1; /* 2x upsample chroma */ if (src_w <= pipe->dst.w) scale_config |= /* G/Y, A */ @@ -1166,7 +1165,7 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) (MDSS_MDP_SCALE_FILTER_PCMN << 8) | (MDSS_MDP_SCALE_FILTER_PCMN << 16); - if ((src_w >> chroma_shift) <= pipe->dst.w) + if ((src_w >> chroma_shift_x) <= pipe->dst.w) scale_config |= /* CrCb */ (MDSS_MDP_SCALE_FILTER_BIL << 12); else @@ -1175,7 +1174,8 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) writel_relaxed(init_phasex, pipe->base + MDSS_MDP_REG_VIG_QSEED2_C12_INIT_PHASEX); - writel_relaxed(phasex_step >> chroma_shift, pipe->base + + writel_relaxed(phasex_step >> chroma_shift_x, + pipe->base + MDSS_MDP_REG_VIG_QSEED2_C12_PHASESTEPX); } else { if (src_w <= pipe->dst.w) @@ -1235,10 +1235,48 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe) /*program pixel extn values for the SSPP*/ mdss_mdp_pipe_program_pixel_extn(pipe); } else { - writel_relaxed(phasex_step, pipe->base + - MDSS_MDP_REG_SCALE_PHASE_STEP_X); - writel_relaxed(phasey_step, pipe->base + - MDSS_MDP_REG_SCALE_PHASE_STEP_Y); + if (pipe->type == MDSS_MDP_PIPE_TYPE_VIG) { + /*program x,y initial phase and phase step*/ + writel_relaxed(0, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C03_INIT_PHASEX); + writel_relaxed(init_phasex, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C12_INIT_PHASEX); + writel_relaxed(phasex_step, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C03_PHASESTEPX); + writel_relaxed(phasex_step >> chroma_shift_x, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C12_PHASESTEPX); + + writel_relaxed(0, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C03_INIT_PHASEY); + writel_relaxed(init_phasey, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C12_INIT_PHASEY); + writel_relaxed(phasey_step, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C03_PHASESTEPY); + writel_relaxed(phasey_step >> chroma_shift_y, + pipe->base + + MDSS_MDP_REG_VIG_QSEED2_C12_PHASESTEPY); + } else { + + writel_relaxed(phasex_step, + pipe->base + + MDSS_MDP_REG_SCALE_PHASE_STEP_X); + writel_relaxed(phasey_step, + pipe->base + + MDSS_MDP_REG_SCALE_PHASE_STEP_Y); + writel_relaxed(0, + pipe->base + + MDSS_MDP_REG_SCALE_INIT_PHASE_X); + writel_relaxed(0, + pipe->base + + MDSS_MDP_REG_SCALE_INIT_PHASE_Y); + } } writel_relaxed(scale_config, pipe->base + |
