From: Veera Sundaram Sankaran Date: Tue, 5 Jan 2016 21:32:57 +0000 (-0800) Subject: msm: mdss: move used pipes to cleanup list on overlay free X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=45b00409c35788c603d0b69a90e2f856cb0093d9;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git msm: mdss: move used pipes to cleanup list on overlay free Avoid moving pipes to destroy list during overlay free based on the pipe play count as it might not give the actual information. The play count is set to 0 for all new or config changed pipes during the validate call. And if we get a fb_release_all request right after the validate, it would indicate an inconsistent state for the play count. Instead, move the used pipes to cleanup list, so that the NULL kickoff would handle the pipes to be unstaged and destroyed. Change-Id: I0026d512e92d0d59962ee8114873f7804a31c018 Signed-off-by: Veera Sundaram Sankaran --- diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index c2d5ec1106f5..8e3074de1496 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -1,4 +1,4 @@ -/* 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;