Commit 043cd2d1 authored by Chris Wilson's avatar Chris Wilson

drm/i915/gt: Leave rps->cur_freq on unpark

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200322163225.28791-2-chris@chris-wilson.co.uk
parent 21abf0bf
...@@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps) ...@@ -187,10 +187,8 @@ static void gen5_rps_init(struct intel_rps *rps)
fmax, fmin, fstart); fmax, fmin, fstart);
rps->min_freq = fmax; rps->min_freq = fmax;
rps->efficient_freq = fstart;
rps->max_freq = fmin; rps->max_freq = fmin;
rps->idle_freq = rps->min_freq;
rps->cur_freq = rps->idle_freq;
} }
static unsigned long static unsigned long
...@@ -713,8 +711,6 @@ static int rps_set(struct intel_rps *rps, u8 val, bool update) ...@@ -713,8 +711,6 @@ static int rps_set(struct intel_rps *rps, u8 val, bool update)
void intel_rps_unpark(struct intel_rps *rps) void intel_rps_unpark(struct intel_rps *rps)
{ {
u8 freq;
if (!rps->enabled) if (!rps->enabled)
return; return;
...@@ -726,9 +722,10 @@ void intel_rps_unpark(struct intel_rps *rps) ...@@ -726,9 +722,10 @@ void intel_rps_unpark(struct intel_rps *rps)
WRITE_ONCE(rps->active, true); WRITE_ONCE(rps->active, true);
freq = max(rps->cur_freq, rps->efficient_freq), intel_rps_set(rps,
freq = clamp(freq, rps->min_freq_softlimit, rps->max_freq_softlimit); clamp(rps->cur_freq,
intel_rps_set(rps, freq); rps->min_freq_softlimit,
rps->max_freq_softlimit));
rps->last_adj = 0; rps->last_adj = 0;
...@@ -1672,7 +1669,9 @@ void intel_rps_init(struct intel_rps *rps) ...@@ -1672,7 +1669,9 @@ void intel_rps_init(struct intel_rps *rps)
/* Finally allow us to boost to max by default */ /* Finally allow us to boost to max by default */
rps->boost_freq = rps->max_freq; rps->boost_freq = rps->max_freq;
rps->idle_freq = rps->min_freq; rps->idle_freq = rps->min_freq;
rps->cur_freq = rps->idle_freq;
/* Start in the middle, from here we will autotune based on workload */
rps->cur_freq = rps->efficient_freq;
rps->pm_intrmsk_mbz = 0; rps->pm_intrmsk_mbz = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment