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

Commit a2bca30f authored by Xiaoming Zhou's avatar Xiaoming Zhou Committed by Shivaraj Shetty
Browse files

msm: mdss: update the backlight only when successful commit



During suspend and resume, the first commit got called with
no overlay buffer.   The backlight is turned on regardless
of successful commit or not.   This then causes display
corruption.

Change-Id: I00fada5f6bedabf6ab0df97f6d429297d7fb601f
Signed-off-by: default avatarXiaoming Zhou <zhoux@codeaurora.org>
parent c99f9b85
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1436,7 +1436,7 @@ static void mdss_fb_commit_wq_handler(struct work_struct *work)
	struct fb_var_screeninfo *var;
	struct fb_info *info;
	struct msm_fb_backup_type *fb_backup;
	int ret;
	int ret = 0;

	mfd = container_of(work, struct msm_fb_data_type, commit_work);
	fb_backup = (struct msm_fb_backup_type *)mfd->msm_fb_backup;
@@ -1445,7 +1445,8 @@ static void mdss_fb_commit_wq_handler(struct work_struct *work)
		MDP_DISPLAY_COMMIT_OVERLAY) {
		mdss_fb_wait_for_fence(&mfd->mdp_sync_pt_data);
		if (mfd->mdp.kickoff_fnc)
			mfd->mdp.kickoff_fnc(mfd);
			ret = mfd->mdp.kickoff_fnc(mfd);
		if (!ret)
			mdss_fb_update_backlight(mfd);
		mdss_fb_signal_timeline(&mfd->mdp_sync_pt_data);
	} else {