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

Commit a7ba435f authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa
Browse files

msm: mdss: overlay: skip kickoff for empty pan_display during handoff



If an empty pan_display is called before handoff is completed,
the NULL commit would introduce a blank frame. Skip the kickoff,
to avoid displaying blank frame.

CRs-Fixed: 1015574
Change-Id: I7f0af10acaf6d3b1e72e74320d03a2a926ccdd06
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent db9c2c43
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -1359,7 +1359,7 @@ int mdss_mdp_overlay_start(struct msm_fb_data_type *mfd)
		if (rc) {
			pr_debug("empty kickoff on fb%d during cont splash\n",
					mfd->index);
			return 0;
			return -EPERM;
		}
	} else if (mdata->handoff_pending) {
		pr_warn("fb%d: commit while splash handoff pending\n",
@@ -2468,7 +2468,7 @@ done:
static void mdss_mdp_overlay_pan_display(struct msm_fb_data_type *mfd)
{
	struct mdss_mdp_data *buf_l = NULL, *buf_r = NULL;
	struct mdss_mdp_pipe *l_pipe, *r_pipe;
	struct mdss_mdp_pipe *l_pipe, *r_pipe, *pipe, *tmp;
	struct fb_info *fbi;
	struct mdss_overlay_private *mdp5_data;
	struct mdss_data_type *mdata;
@@ -2497,6 +2497,19 @@ static void mdss_mdp_overlay_pan_display(struct msm_fb_data_type *mfd)

	if (IS_ERR_OR_NULL(mfd->fbmem_buf) || fbi->fix.smem_len == 0 ||
		mdp5_data->borderfill_enable) {
		if (mdata->handoff_pending) {
			/*
			 * Move pipes to cleanup queue and avoid kickoff if
			 * pan display is called before handoff is completed.
			 */
			mutex_lock(&mdp5_data->list_lock);
			list_for_each_entry_safe(pipe, tmp,
			    &mdp5_data->pipes_used, list) {
				list_move(&pipe->list,
					&mdp5_data->pipes_cleanup);
			}
			mutex_unlock(&mdp5_data->list_lock);
		}
		mfd->mdp.kickoff_fnc(mfd, NULL);
		return;
	}