-/* 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
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) {
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;