Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/i915_pm_rc6_residency: Make ringbuffer rc6 fast
Date: Tue, 24 Mar 2020 12:52:33 +0000	[thread overview]
Message-ID: <20200324125233.56308-1-chris@chris-wilson.co.uk> (raw)

The legacy ringbuffer submission lacks a fast soft-rc6
mechanism as we have no interrupt for an idle ring. As such
we are at the mercy of HW RC6... which is not quite as
precise as we need to pass this test. Oh well.

Since HW is not fast enough to minimise power draw, tell the driver to
park as soon as we know we are idle. One day, we hope for the driver to
discover a mechanism to do this for itself, for as this test shows that
can save us Watts!

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1516
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/i915_pm_rc6_residency.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c
index f507f76bc..d2dc37a16 100644
--- a/tests/i915/i915_pm_rc6_residency.c
+++ b/tests/i915/i915_pm_rc6_residency.c
@@ -310,6 +310,17 @@ static void bg_load(int i915, unsigned int flags, unsigned long *ctl)
 		}
 		ctl[1]++;
 
+		/*
+		 * The legacy ringbuffer submission lacks a fast soft-rc6
+		 * mechanism as we have no interrupt for an idle ring. As such
+		 * we are at the mercy of HW RC6... which is not quite as
+		 * precise as we need to pass this test. Oh well.
+		 *
+		 * Fake it until we make it.
+		 */
+		if (!gem_has_execlists(i915))
+			igt_drop_caches_set(i915, DROP_IDLE);
+
 		usleep(igt_nsec_elapsed(&tv) / 10); /* => 1% busy */
 	} while (!READ_ONCE(*ctl));
 }
-- 
2.26.0.rc2

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2020-03-24 12:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-24 12:52 Chris Wilson [this message]
2020-03-24 13:45 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/i915_pm_rc6_residency: Make ringbuffer rc6 fast Patchwork
2020-03-24 14:54 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-03-24 15:24 ` [Intel-gfx] [PATCH i-g-t] " Andi Shyti

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=20200324125233.56308-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox