Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f88dd9de authored by Subhash Jadavani's avatar Subhash Jadavani
Browse files

PM / devfreq: fix scaling down logic for simple clock scaling



When "simple_scaling" flag is enabled for on demand governor then clocks
should be scaled up when the load is more than up threshold and should
be scaled down when load is less than the up threshold minus down
differential threshold. But currently governor is only scaling down
when load is less than the down differential threshold which is definitely
not intentional. This change fixes the above bug.

Change-Id: If2a234155c12989dc0df397cd84eef4a759ecdfc
Signed-off-by: default avatarSubhash Jadavani <subhashj@codeaurora.org>
parent 923e3857
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -55,7 +55,8 @@ static int devfreq_simple_ondemand_func(struct devfreq *df,
		    stat.total_time * dfso_upthreshold)
			*freq = max;
		else if (stat.busy_time * 100 <
		    stat.total_time * dfso_downdifferential)
			 stat.total_time *
			 (dfso_upthreshold - dfso_downdifferential))
			*freq = min;
		else
			*freq = df->previous_freq;