Message ID | 20200322163225.28791-2-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] drm/i915/gt: Treat idling as a RPS downclock event | expand |
Hi Chris, On Sun, Mar 22, 2020 at 04:32:25PM +0000, Chris Wilson wrote: > Don't override our previous frequency we used after parking, and avoid > continually spiking back to the efficient frequency for mostly idle > workloads. Trust our ability to autotune across a workload switch. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Andi Shyti <andi.shyti@intel.com> > Cc: Lyude Paul <lyude@redhat.com> > --- > drivers/gpu/drm/i915/gt/intel_rps.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c > index 50884aeac49c..487c89593125 100644 > --- a/drivers/gpu/drm/i915/gt/intel_rps.c > +++ b/drivers/gpu/drm/i915/gt/intel_rps.c > @@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps) > fmax, fmin, fstart); > > rps->min_freq = fmax; > + rps->efficient_freq = fstart; > rps->max_freq = fmin; > - > - rps->idle_freq = rps->min_freq; > - rps->cur_freq = rps->idle_freq; > } > > static unsigned long > @@ -726,7 +724,6 @@ void intel_rps_unpark(struct intel_rps *rps) > > WRITE_ONCE(rps->active, true); > > - freq = max(rps->cur_freq, rps->efficient_freq), > freq = clamp(freq, rps->min_freq_softlimit, rps->max_freq_softlimit); > intel_rps_set(rps, freq); > > @@ -1672,7 +1669,7 @@ void intel_rps_init(struct intel_rps *rps) > /* Finally allow us to boost to max by default */ > rps->boost_freq = rps->max_freq; > rps->idle_freq = rps->min_freq; > - rps->cur_freq = rps->idle_freq; > + rps->cur_freq = rps->efficient_freq; /* start in the middle */ right... thank you! Reviewed-by: Andi Shyti <andi.shyti@intel.com> Thanks, Andi
diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c index 50884aeac49c..487c89593125 100644 --- a/drivers/gpu/drm/i915/gt/intel_rps.c +++ b/drivers/gpu/drm/i915/gt/intel_rps.c @@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps) fmax, fmin, fstart); rps->min_freq = fmax; + rps->efficient_freq = fstart; rps->max_freq = fmin; - - rps->idle_freq = rps->min_freq; - rps->cur_freq = rps->idle_freq; } static unsigned long @@ -726,7 +724,6 @@ void intel_rps_unpark(struct intel_rps *rps) WRITE_ONCE(rps->active, true); - freq = max(rps->cur_freq, rps->efficient_freq), freq = clamp(freq, rps->min_freq_softlimit, rps->max_freq_softlimit); intel_rps_set(rps, freq); @@ -1672,7 +1669,7 @@ void intel_rps_init(struct intel_rps *rps) /* Finally allow us to boost to max by default */ rps->boost_freq = rps->max_freq; rps->idle_freq = rps->min_freq; - rps->cur_freq = rps->idle_freq; + rps->cur_freq = rps->efficient_freq; /* start in the middle */ rps->pm_intrmsk_mbz = 0;
Don't override our previous frequency we used after parking, and avoid continually spiking back to the efficient frequency for mostly idle workloads. Trust our ability to autotune across a workload switch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Andi Shyti <andi.shyti@intel.com> Cc: Lyude Paul <lyude@redhat.com> --- drivers/gpu/drm/i915/gt/intel_rps.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)