diff options
| author | Gopikrishnaiah Anandan <agopik@codeaurora.org> | 2015-01-06 15:15:45 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:37:09 -0700 |
| commit | a3beddf7a2cb4e8741bd6dfc2ff38817e997dfe8 (patch) | |
| tree | 207ebe6417668e321b73a589326e27b877c53be4 /drivers/video | |
| parent | fc10390561e189eb7c4b4339b8407e3a82cf397f (diff) | |
msm: mdss: Remove code duplication in sspp config
When caching the SSPP(source surface post processing) pipes parameters
pipe type should be checked for all PP features. SSPP config
function was checking the pipe type for multiple features which results
in code duplication. This change removes the code duplication by moving
the checks to top of the function.
Change-Id: I5f817ba881ab3763132360a2870830e0c40c887b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index 67b4c16f4778..8bbc26e2f880 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -6082,19 +6082,17 @@ int mdss_mdp_pp_sspp_config(struct mdss_mdp_pipe *pipe) pr_err("invalid params %p\n", pipe); return -EINVAL; } - + cache_res.mdss_pp_res = NULL; + cache_res.pipe_res = pipe; + ret = sspp_cache_location(pipe->type, &cache_res.block); + if (ret) { + pr_err("invalid cache res block for igc ret %d\n", + ret); + goto exit_fail; + } len = pipe->pp_cfg.igc_cfg.len; if ((pipe->pp_cfg.config_ops & MDP_OVERLAY_PP_IGC_CFG)) { if (pp_ops[IGC].pp_set_config) { - ret = sspp_cache_location(pipe->type, - &cache_res.block); - if (ret) { - pr_err("invalid cache res block for igc ret %d\n", - ret); - goto exit_fail; - } - cache_res.mdss_pp_res = NULL; - cache_res.pipe_res = pipe; ret = pp_igc_lut_cache_params(&pipe->pp_cfg.igc_cfg, &cache_res, false); if (ret) { @@ -6153,9 +6151,6 @@ int mdss_mdp_pp_sspp_config(struct mdss_mdp_pipe *pipe) } if ((pipe->pp_cfg.config_ops & MDP_OVERLAY_PP_PA_V2_CFG) && (pp_ops[PA].pp_set_config)) { - cache_res.block = SSPP_VIG; - cache_res.mdss_pp_res = NULL; - cache_res.pipe_res = pipe; ret = pp_pa_cache_params(&pipe->pp_cfg.pa_v2_cfg_data, &cache_res); if (ret) { @@ -6166,15 +6161,6 @@ int mdss_mdp_pp_sspp_config(struct mdss_mdp_pipe *pipe) } if (pipe->pp_cfg.config_ops & MDP_OVERLAY_PP_PCC_CFG && pp_ops[PCC].pp_set_config) { - ret = sspp_cache_location(pipe->type, - &cache_res.block); - if (ret) { - pr_err("invalid cache res block for pcc ret %d\n", - ret); - goto exit_fail; - } - cache_res.mdss_pp_res = NULL; - cache_res.pipe_res = pipe; ret = pp_pcc_cache_params(&pipe->pp_cfg.pcc_cfg_data, &cache_res); if (ret) { |
