[Intel-gfx] [PATCH 2/2] drm/i915/gt: Leave rps->cur_freq on unpark
Chris Wilson
chris at chris-wilson.co.uk
Sun Mar 22 16:32:25 UTC 2020
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 at chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti at intel.com>
Cc: Lyude Paul <lyude at 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 */
rps->pm_intrmsk_mbz = 0;
--
2.20.1
More information about the Intel-gfx
mailing list