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

Commit f1eb9948 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: move used pipes to cleanup list on overlay free"

parents 4b390331 f2464ec7
Loading
Loading
Loading
Loading
+2 −16
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2065,7 +2065,6 @@ int mdss_mdp_overlay_release(struct msm_fb_data_type *mfd, int ndx)
	struct mdss_mdp_pipe *pipe, *tmp;
	struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd);
	u32 unset_ndx = 0;
	int destroy_pipe;

	mutex_lock(&mdp5_data->list_lock);
	list_for_each_entry_safe(pipe, tmp, &mdp5_data->pipes_used, list) {
@@ -2079,22 +2078,9 @@ int mdss_mdp_overlay_release(struct msm_fb_data_type *mfd, int ndx)
			unset_ndx |= pipe->ndx;

			pipe->file = NULL;
			destroy_pipe = pipe->play_cnt == 0;
			if (!destroy_pipe)
				list_move(&pipe->list,
						&mdp5_data->pipes_cleanup);
			else
				list_del_init(&pipe->list);
			list_move(&pipe->list, &mdp5_data->pipes_cleanup);

			mdss_mdp_pipe_unmap(pipe);
			if (destroy_pipe) {
				mdss_mdp_mixer_pipe_unstage(pipe,
					pipe->mixer_left);
				mdss_mdp_mixer_pipe_unstage(pipe,
					pipe->mixer_right);
				pipe->mixer_stage = MDSS_MDP_STAGE_UNUSED;
				__overlay_pipe_cleanup(mfd, pipe);
			}

			if (unset_ndx == ndx)
				break;