|
@@ -494,7 +494,6 @@ static int sugov_init(struct cpufreq_policy *policy)
|
|
|
{
|
|
|
struct sugov_policy *sg_policy;
|
|
|
struct sugov_tunables *tunables;
|
|
|
- unsigned int lat;
|
|
|
int ret = 0;
|
|
|
|
|
|
/* State should be equivalent to EXIT */
|
|
@@ -533,10 +532,16 @@ static int sugov_init(struct cpufreq_policy *policy)
|
|
|
goto stop_kthread;
|
|
|
}
|
|
|
|
|
|
- tunables->rate_limit_us = LATENCY_MULTIPLIER;
|
|
|
- lat = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
|
|
|
- if (lat)
|
|
|
- tunables->rate_limit_us *= lat;
|
|
|
+ if (policy->transition_delay_us) {
|
|
|
+ tunables->rate_limit_us = policy->transition_delay_us;
|
|
|
+ } else {
|
|
|
+ unsigned int lat;
|
|
|
+
|
|
|
+ tunables->rate_limit_us = LATENCY_MULTIPLIER;
|
|
|
+ lat = policy->cpuinfo.transition_latency / NSEC_PER_USEC;
|
|
|
+ if (lat)
|
|
|
+ tunables->rate_limit_us *= lat;
|
|
|
+ }
|
|
|
|
|
|
policy->governor_data = sg_policy;
|
|
|
sg_policy->tunables = tunables;
|