drivers/power/activity_governor.c: Fix timer can't start when meet very small pmtick.
This commit is contained in:
parent
64aff3bf6d
commit
a3646986ea
1 changed files with 6 additions and 2 deletions
|
|
@ -594,12 +594,16 @@ static void governor_timer(int domain)
|
|||
pdomstate->wdog = wd_create();
|
||||
}
|
||||
|
||||
if (state < PM_SLEEP && !pdom->stay[pdom->state] &&
|
||||
pmtick[state])
|
||||
if (state < PM_SLEEP && !pdom->stay[pdom->state])
|
||||
{
|
||||
int delay = pmtick[state] + pdomstate->btime - clock_systimer();
|
||||
int left = wd_gettime(pdomstate->wdog);
|
||||
|
||||
if (delay <= 0)
|
||||
{
|
||||
delay = 1;
|
||||
}
|
||||
|
||||
if (!WDOG_ISACTIVE(pdomstate->wdog) || abs(delay - left) > PM_TIMER_GAP)
|
||||
{
|
||||
wd_start(pdomstate->wdog, delay, governor_timer_cb, 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue