video: tegra: dc: Fix clk enable/disable
Animesh Kishore [Thu, 27 Dec 2012 08:43:59 +0000 (13:43 +0530)]
-disable pll when display off
-balance extra clk reference

Bug 1209013

Change-Id: Ib810281ae692f6443171f4542ba71abb1d62e1d4
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/174432
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

drivers/video/tegra/dc/dc.c

index e25cb99..a6973f0 100644 (file)
@@ -2015,13 +2015,6 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc)
 
        tegra_dc_clear_bandwidth(dc);
 
-       /* ugly hack */
-       if (dc->out_ops->release &&
-               (dc->out->flags & TEGRA_DC_OUT_ONE_SHOT_LP_MODE))
-               tegra_dc_release_dc_out(dc);
-       else
-               tegra_dc_clk_disable(dc);
-
        if (dc->out && dc->out->disable)
                dc->out->disable();
 
@@ -2044,6 +2037,9 @@ static void _tegra_dc_controller_disable(struct tegra_dc *dc)
                }
        }
        trace_display_disable(dc);
+
+       tegra_dc_clk_disable(dc);
+       tegra_dc_release_dc_out(dc);
 }
 
 void tegra_dc_stats_enable(struct tegra_dc *dc, bool enable)