Skip to content

Commit

Permalink
OMAP: DSS2: Check ctx loss count only when starting the first clock
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Feb 15, 2010
1 parent 6eed73d commit e296264
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,11 @@ static void dss_clk_enable_no_ctx(enum dss_clock clks)

void dss_clk_enable(enum dss_clock clks)
{
bool check_ctx = core.num_clks_enabled == 0;

dss_clk_enable_no_ctx(clks);

if (cpu_is_omap34xx() && dss_need_ctx_restore())
if (check_ctx && cpu_is_omap34xx() && dss_need_ctx_restore())
restore_all_ctx();
}

Expand Down

0 comments on commit e296264

Please sign in to comment.