OSDN Git Service

msm: mdss: move used pipes to cleanup list on overlay free
authorVeera Sundaram Sankaran <veeras@codeaurora.org>
Tue, 5 Jan 2016 21:32:57 +0000 (13:32 -0800)
committerDavid Keitel <dkeitel@codeaurora.org>
Thu, 24 Mar 2016 04:14:34 +0000 (21:14 -0700)
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 <veeras@codeaurora.org>
drivers/video/fbdev/msm/mdss_mdp_overlay.c

index c2d5ec1..8e3074d 100644 (file)
@@ -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;