summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c24
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));