@@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps)
187
187
fmax , fmin , fstart );
188
188
189
189
rps -> min_freq = fmax ;
190
+ rps -> efficient_freq = fstart ;
190
191
rps -> max_freq = fmin ;
191
-
192
- rps -> idle_freq = rps -> min_freq ;
193
- rps -> cur_freq = rps -> idle_freq ;
194
192
}
195
193
196
194
static unsigned long
@@ -713,8 +711,6 @@ static int rps_set(struct intel_rps *rps, u8 val, bool update)
713
711
714
712
void intel_rps_unpark (struct intel_rps * rps )
715
713
{
716
- u8 freq ;
717
-
718
714
if (!rps -> enabled )
719
715
return ;
720
716
@@ -726,9 +722,10 @@ void intel_rps_unpark(struct intel_rps *rps)
726
722
727
723
WRITE_ONCE (rps -> active , true);
728
724
729
- freq = max (rps -> cur_freq , rps -> efficient_freq ),
730
- freq = clamp (freq , rps -> min_freq_softlimit , rps -> max_freq_softlimit );
731
- intel_rps_set (rps , freq );
725
+ intel_rps_set (rps ,
726
+ clamp (rps -> cur_freq ,
727
+ rps -> min_freq_softlimit ,
728
+ rps -> max_freq_softlimit ));
732
729
733
730
rps -> last_adj = 0 ;
734
731
@@ -1672,7 +1669,9 @@ void intel_rps_init(struct intel_rps *rps)
1672
1669
/* Finally allow us to boost to max by default */
1673
1670
rps -> boost_freq = rps -> max_freq ;
1674
1671
rps -> idle_freq = rps -> min_freq ;
1675
- rps -> cur_freq = rps -> idle_freq ;
1672
+
1673
+ /* Start in the middle, from here we will autotune based on workload */
1674
+ rps -> cur_freq = rps -> efficient_freq ;
1676
1675
1677
1676
rps -> pm_intrmsk_mbz = 0 ;
1678
1677
0 commit comments