All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [CI 5/6] drm/i915/gt: Apply the aggressive downclocking to parking
Date: Wed, 29 Apr 2020 11:35:34 +0100	[thread overview]
Message-ID: <20200429103535.27781-5-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <20200429103535.27781-1-chris@chris-wilson.co.uk>

We treat parking as a manual RPS timeout event, and downclock the GPU
for the next unpark and batch execution. However, having restored the
aggressive downclocking and observed that we have very light workloads
whose only interaction is through the manual parking events, carry over
the aggressive downclocking to the fake RPS events.

References: 21abf0bf168d ("drm/i915/gt: Treat idling as a RPS downclock event")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_rps.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
index f723a9cdd24e..a2ff98706fef 100644
--- a/drivers/gpu/drm/i915/gt/intel_rps.c
+++ b/drivers/gpu/drm/i915/gt/intel_rps.c
@@ -835,8 +835,6 @@ void intel_rps_unpark(struct intel_rps *rps)
 			    rps->min_freq_softlimit,
 			    rps->max_freq_softlimit));
 
-	rps->last_adj = 0;
-
 	mutex_unlock(&rps->lock);
 
 	rps->pm_iir = 0;
@@ -851,6 +849,8 @@ void intel_rps_unpark(struct intel_rps *rps)
 
 void intel_rps_park(struct intel_rps *rps)
 {
+	int adj;
+
 	if (!intel_rps_clear_active(rps))
 		return;
 
@@ -889,8 +889,13 @@ void intel_rps_park(struct intel_rps *rps)
 	 * (Note we accommodate Cherryview's limitation of only using an
 	 * even bin by applying it to all.)
 	 */
-	rps->cur_freq =
-		max_t(int, round_down(rps->cur_freq - 1, 2), rps->min_freq);
+	adj = rps->last_adj;
+	if (adj < 0)
+		adj *= 2;
+	else /* CHV needs even encode values */
+		adj = -2;
+	rps->last_adj = adj;
+	rps->cur_freq = max_t(int, rps->cur_freq + adj, rps->min_freq);
 
 	GT_TRACE(rps_to_gt(rps), "park:%x\n", rps->cur_freq);
 }
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-04-29 10:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 10:35 [Intel-gfx] [CI 1/6] drm/i915/gt: Always enable busy-stats for execlists Chris Wilson
2020-04-29 10:35 ` [Intel-gfx] [CI 2/6] drm/i915/gt: Move rps.enabled/active to flags Chris Wilson
2020-04-29 10:35 ` [Intel-gfx] [CI 3/6] drm/i915/gt: Track use of RPS interrupts in flags Chris Wilson
2020-04-29 10:35 ` [Intel-gfx] [CI 4/6] drm/i915/gt: Switch to manual evaluation of RPS Chris Wilson
2020-04-29 10:35 ` Chris Wilson [this message]
2020-04-29 10:35 ` [Intel-gfx] [CI 6/6] drm/i915/gt: Restore aggressive post-boost downclocking Chris Wilson
2020-04-29 11:09 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/6] drm/i915/gt: Always enable busy-stats for execlists Patchwork
2020-04-29 11:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-04-29 14:33 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-04-29 20:54 [Intel-gfx] [CI 1/6] " Chris Wilson
2020-04-29 20:54 ` [Intel-gfx] [CI 5/6] drm/i915/gt: Apply the aggressive downclocking to parking Chris Wilson
2020-04-28 21:31 [Intel-gfx] [CI 1/6] drm/i915/gt: Always enable busy-stats for execlists Chris Wilson
2020-04-28 21:31 ` [Intel-gfx] [CI 5/6] drm/i915/gt: Apply the aggressive downclocking to parking Chris Wilson
2020-04-28 10:33 [Intel-gfx] [CI 1/6] drm/i915/gt: Always enable busy-stats for execlists Chris Wilson
2020-04-28 10:33 ` [Intel-gfx] [CI 5/6] drm/i915/gt: Apply the aggressive downclocking to parking Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200429103535.27781-5-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.