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

Commit 2166ef69 authored by Krishna Chaitanya Devarakonda's avatar Krishna Chaitanya Devarakonda Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Signal outstanding fences when panel is dead



When the panel is in dead state, we early return from
the commit. So, the fences wouldn't be signalled till
the next Blank call. Handling this case by signalling
the outstanding fences when panel is in dead state.

Change-Id: I48a5e04707e32de0d1cdccf0592c981e30b618fc
Signed-off-by: default avatarKrishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
parent cf9101fd
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4473,6 +4473,7 @@ static int mdss_fb_atomic_commit_ioctl(struct fb_info *info,
	struct mdp_frc_info *frc_info = NULL;
	struct mdp_frc_info __user *frc_info_user;
	struct msm_fb_data_type *mfd;
	struct mdss_overlay_private *mdp5_data = NULL;

	ret = copy_from_user(&commit, argp, sizeof(struct mdp_layer_commit));
	if (ret) {
@@ -4484,9 +4485,20 @@ static int mdss_fb_atomic_commit_ioctl(struct fb_info *info,
	if (!mfd)
		return -EINVAL;

	mdp5_data = mfd_to_mdp5_data(mfd);

	if (mfd->panel_info->panel_dead) {
		pr_debug("early commit return\n");
		MDSS_XLOG(mfd->panel_info->panel_dead);
		/*
		 * In case of an ESD attack, since we early return from the
		 * commits, we need to signal the outstanding fences.
		 */
		mdss_fb_release_fences(mfd);
		if ((mfd->panel.type == MIPI_CMD_PANEL) &&
			mfd->mdp.signal_retire_fence && mdp5_data)
			mfd->mdp.signal_retire_fence(mfd,
						mdp5_data->retire_cnt);
		return 0;
	}