aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2009-12-01 06:23:25 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-15 08:14:43 -0500
commite296264977f68ddf395b8f93f8e174930f88499a (patch)
tree64b12f21537a5c305d64418bad99bfcdbed4cb7f
parent6eed73debf5840a42ebe9ea90958d2ce4a38c6b0 (diff)
OMAP: DSS2: Check ctx loss count only when starting the first clock
When OMAP PM layer is no-op/debug, the PM layer will increment context loss count with every call. This resulted DSS2 to restore context whenever a clock was enabled. This commit checks the context loss count only when the context actually could have been lost, ie. when enabling a clock when no clocks had been previously enabled. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-rw-r--r--drivers/video/omap2/dss/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 5939da9cf021..72547dfc56b8 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -289,9 +289,11 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks)
289 289
290void dss_clk_enable(enum dss_clock clks) 290void dss_clk_enable(enum dss_clock clks)
291{ 291{
292 bool check_ctx = core.num_clks_enabled == 0;
293
292 dss_clk_enable_no_ctx(clks); 294 dss_clk_enable_no_ctx(clks);
293 295
294 if (cpu_is_omap34xx() && dss_need_ctx_restore()) 296 if (check_ctx && cpu_is_omap34xx() && dss_need_ctx_restore())
295 restore_all_ctx(); 297 restore_all_ctx();
296} 298}
297 299