msm: mdss: disable auto refresh before configuring tearcheck
If auto refresh mode is enabled in LK, then it needs be disabled when kernel loads. Otherwise it might cause display corruption, when in kernel display again configures tearcheck block. Change-Id: I0b4dddee25e39cea4f32b8afd537993ad64ea812 Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
This commit is contained in:
parent
3d2a71a568
commit
3d3dd8c529
1 changed files with 25 additions and 1 deletions
|
@ -303,11 +303,35 @@ static int mdss_mdp_cmd_tearcheck_setup(struct mdss_mdp_cmd_ctx *ctx,
|
||||||
bool locked)
|
bool locked)
|
||||||
{
|
{
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
struct mdss_mdp_mixer *mixer;
|
struct mdss_mdp_mixer *mixer = NULL, *mixer_right = NULL;
|
||||||
struct mdss_mdp_ctl *ctl = ctx->ctl;
|
struct mdss_mdp_ctl *ctl = ctx->ctl;
|
||||||
|
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
||||||
|
u32 offset = 0;
|
||||||
|
|
||||||
mixer = mdss_mdp_mixer_get(ctl, MDSS_MDP_MIXER_MUX_LEFT);
|
mixer = mdss_mdp_mixer_get(ctl, MDSS_MDP_MIXER_MUX_LEFT);
|
||||||
if (mixer) {
|
if (mixer) {
|
||||||
|
/*
|
||||||
|
* Disable auto refresh mode, if enabled in splash to
|
||||||
|
* avoid corruption.
|
||||||
|
*/
|
||||||
|
if (mdss_mdp_pingpong_read(mixer->pingpong_base,
|
||||||
|
MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG) & BIT(31)) {
|
||||||
|
offset = MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG;
|
||||||
|
if (is_pingpong_split(ctl->mfd))
|
||||||
|
writel_relaxed(0x0,
|
||||||
|
(mdata->slave_pingpong_base + offset));
|
||||||
|
if (is_split_lm(ctl->mfd)) {
|
||||||
|
mixer_right =
|
||||||
|
mdss_mdp_mixer_get(ctl,
|
||||||
|
MDSS_MDP_MIXER_MUX_RIGHT);
|
||||||
|
if (mixer_right)
|
||||||
|
writel_relaxed(0x0,
|
||||||
|
(mixer_right->pingpong_base + offset));
|
||||||
|
}
|
||||||
|
mdss_mdp_pingpong_write(mixer->pingpong_base,
|
||||||
|
MDSS_MDP_REG_PP_AUTOREFRESH_CONFIG, 0x0);
|
||||||
|
pr_debug("%s: disabling auto refresh\n", __func__);
|
||||||
|
}
|
||||||
rc = mdss_mdp_cmd_tearcheck_cfg(mixer, ctx, locked);
|
rc = mdss_mdp_cmd_tearcheck_cfg(mixer, ctx, locked);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
Loading…
Add table
Reference in a new issue