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

Commit c0a63804 authored by Ping Li's avatar Ping Li
Browse files

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



When framebuffer device is released, the AD status variables need
to be reset.

Change-Id: I7240a43949b429214cc8e0b4fa7c59823aeafb87
Signed-off-by: default avatarPing Li <pingli@codeaurora.org>
parent a6b58f17
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -6648,11 +6648,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;
}