Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d9c76cb authored by Ping Li's avatar Ping Li
Browse files

msm: mdss: Correct AD state in driver



There is one recent change in MDP driver that removes the vsync handler
when device goes to suspend, and this change puts AD into an incorrect
state after suspend/resume. This change modify the AD implementation
to coordinate the MDP driver change mentioned above by adding the AD
vsync back during resume. This change also fix the state resetting
during AD off case.

Change-Id: Ic31a791fa6f8fe5ba731837f8d9808d20e2d31e6
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent 1a5da77f
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -2173,6 +2173,7 @@ int mdss_mdp_pp_resume(struct msm_fb_data_type *mfd)
	if ((PP_AD_STATE_DATA & ad->state) &&
			(ad->sts & PP_STS_ENABLE))
		ad->sts |= PP_AD_STS_DIRTY_DATA;
	ad->state &= ~PP_AD_STATE_VSYNC;
	mutex_unlock(&ad->lock);

	return 0;
@@ -5464,10 +5465,10 @@ static int mdss_mdp_ad_setup(struct msm_fb_data_type *mfd)
			/* Clear state and regs when going to off state*/
			ad->sts = 0;
			ad->sts |= PP_AD_STS_DIRTY_VSYNC;
			ad->state &= !PP_AD_STATE_INIT;
			ad->state &= !PP_AD_STATE_CFG;
			ad->state &= !PP_AD_STATE_DATA;
			ad->state &= !PP_AD_STATE_BL_LIN;
			ad->state &= ~PP_AD_STATE_INIT;
			ad->state &= ~PP_AD_STATE_CFG;
			ad->state &= ~PP_AD_STATE_DATA;
			ad->state &= ~PP_AD_STATE_BL_LIN;
			ad->ad_data = 0;
			ad->ad_data_mode = 0;
			ad->last_bl = 0;