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

Commit 0d19582e authored by Nirmal Abraham's avatar Nirmal Abraham Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: cleanup used pipes during overlay off



During overlay off, cleanup pipes which are currently active
in used pipes list. This is to avoid to a race condition
wherein the pipe params gets changed in prepare cycle,
but the commit cylce has not executed to queue the buffers
associated with the pipe and the same pipe which has old
buffer(stale content) gets used from overlay_off flow.

Change-Id: I117e6ee9854ff287f7bb1055ca745760db980bed
Signed-off-by: default avatarNirmal Abraham <nabrah@codeaurora.org>
parent fc04d93a
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -6011,6 +6011,7 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
	struct mdss_overlay_private *mdp5_data;
	struct mdss_data_type *mdata = mdss_mdp_get_mdata();
	struct mdss_mdp_mixer *mixer;
	struct mdss_mdp_pipe *pipe, *tmp;
	int need_cleanup;
	int retire_cnt;
	bool destroy_ctl = false;
@@ -6054,6 +6055,13 @@ static int mdss_mdp_overlay_off(struct msm_fb_data_type *mfd)
		mixer->cursor_enabled = 0;

	mutex_lock(&mdp5_data->list_lock);
	if (!list_empty(&mdp5_data->pipes_used)) {
		list_for_each_entry_safe(
			pipe, tmp, &mdp5_data->pipes_used, list) {
			pipe->file = NULL;
			list_move(&pipe->list, &mdp5_data->pipes_cleanup);
		}
	}
	need_cleanup = !list_empty(&mdp5_data->pipes_cleanup);
	mutex_unlock(&mdp5_data->list_lock);
	mutex_unlock(&mdp5_data->ov_lock);