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

Commit a9d17b5a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: Reset AD state variables when FB device is released"

parents b924e2b7 c0a63804
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6759,11 +6759,17 @@ static int pp_mfd_ad_release_all(struct msm_fb_data_type *mfd)
	if (!ad->mfd)
		return 0;

	mutex_lock(&ad->lock);
	ad->sts &= ~PP_STS_ENABLE;
	ad->mfd = NULL;
	ad->bl_mfd = NULL;
	ad->state = 0;
	cancel_work_sync(&ad->calc_work);
	mutex_unlock(&ad->lock);

	ctl = mfd_to_ctl(mfd);
	if (ctl && ctl->ops.remove_vsync_handler)
		ctl->ops.remove_vsync_handler(ctl, &ad->handle);
	cancel_work_sync(&ad->calc_work);
	ad->state = 0;

	return ret;
}