summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeevan Shriram <jshriram@codeaurora.org>2015-04-23 23:35:57 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:42:03 -0700
commit31a9bc1fc8011dd83a42b54d610e49e056943027 (patch)
treeb006152f88595c0b346ee77792ef2a4fdafcf950
parent3e187f934f061b13c4723ac674fb1c916f3ebd6c (diff)
msm: mdss: correct second control tearcheck enable base offset
After the commit cdc666d763b835dced549f2811561fdc86338bd4, titled "msm: mdss: enable tearcheck after panel on for synchronization", second control's tearcheck is never enabled due to wrong offset. This change corrects the offset for enabling second control's tear check block. Driver is also not disabling TE in the shutdown path, handle the same in this change. Change-Id: Id187705ddf49578fd2c41dba0fe9071656b17139 Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
index 47568d62e753..1c8277aeebb9 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_intf_cmd.c
@@ -123,7 +123,7 @@ exit:
return cnt;
}
-static int mdss_mdp_tearcheck_enable(struct mdss_mdp_ctl *ctl)
+static int mdss_mdp_tearcheck_enable(struct mdss_mdp_ctl *ctl, bool enable)
{
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
struct mdss_mdp_ctl *sctl;
@@ -145,17 +145,18 @@ static int mdss_mdp_tearcheck_enable(struct mdss_mdp_ctl *ctl)
te = &ctl->panel_data->panel_info.te;
mdss_mdp_pingpong_write(mixer->pingpong_base,
MDSS_MDP_REG_PP_TEAR_CHECK_EN,
- te ? te->tear_check_en : 0);
+ (te ? te->tear_check_en : 0) && enable);
/*
* When there are two controls, driver needs to enable
* tear check configuration for both.
*/
if (sctl) {
+ mixer = mdss_mdp_mixer_get(sctl, MDSS_MDP_MIXER_MUX_LEFT);
te = &sctl->panel_data->panel_info.te;
mdss_mdp_pingpong_write(mixer->pingpong_base,
MDSS_MDP_REG_PP_TEAR_CHECK_EN,
- te ? te->tear_check_en : 0);
+ (te ? te->tear_check_en : 0) && enable);
}
/*
@@ -166,7 +167,7 @@ static int mdss_mdp_tearcheck_enable(struct mdss_mdp_ctl *ctl)
if (is_pingpong_split(ctl->mfd))
mdss_mdp_pingpong_write(mdata->slave_pingpong_base,
MDSS_MDP_REG_PP_TEAR_CHECK_EN,
- te ? te->tear_check_en : 0);
+ (te ? te->tear_check_en : 0) && enable);
return 0;
}
@@ -802,7 +803,7 @@ static int mdss_mdp_cmd_panel_on(struct mdss_mdp_ctl *ctl,
rc = mdss_mdp_ctl_intf_event(ctl, MDSS_EVENT_PANEL_ON, NULL);
WARN(rc, "intf %d panel on error (%d)\n", ctl->intf_num, rc);
- rc = mdss_mdp_tearcheck_enable(ctl);
+ rc = mdss_mdp_tearcheck_enable(ctl, true);
WARN(rc, "intf %d tearcheck enable error (%d)\n",
ctl->intf_num, rc);
@@ -1033,7 +1034,7 @@ int mdss_mdp_cmd_restore(struct mdss_mdp_ctl *ctl)
if (mdss_mdp_cmd_tearcheck_setup(ctl->intf_ctx[MASTER_CTX], true))
pr_warn("%s: tearcheck setup failed\n", __func__);
else
- mdss_mdp_tearcheck_enable(ctl);
+ mdss_mdp_tearcheck_enable(ctl, true);
mdss_mdp_clk_ctrl(MDP_BLOCK_POWER_OFF);
@@ -1099,6 +1100,7 @@ int mdss_mdp_cmd_ctx_stop(struct mdss_mdp_ctl *ctl,
mdss_mdp_cmd_clk_off(ctx);
flush_work(&ctx->pp_done_work);
mdss_mdp_cmd_tearcheck_setup(ctx, false);
+ mdss_mdp_tearcheck_enable(ctl, false);
if (mdss_panel_is_power_on(panel_power_state)) {
pr_debug("%s: intf stopped with panel on\n", __func__);