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/gem_exec_suspend: Exercise S0 (aka s2idle)
Date: Mon,  7 Oct 2019 12:06:51 +0100	[thread overview]
Message-ID: <20191007110651.10486-1-chris@chris-wilson.co.uk> (raw)

Exercise the first level of suspend, S0. This is basically the same as
our runtime-suspend, we need to put the device to sleep but otherwise
it is left powered up.

Ideally, we would measure the energy consumption in this state.

References: https://bugs.freedesktop.org/show_bug.cgi?id=111909
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_suspend.c         | 16 ++++++++++++----
 tests/intel-ci/fast-feedback.testlist |  1 +
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/tests/i915/gem_exec_suspend.c b/tests/i915/gem_exec_suspend.c
index e43a16e9e..f25f1a86b 100644
--- a/tests/i915/gem_exec_suspend.c
+++ b/tests/i915/gem_exec_suspend.c
@@ -32,10 +32,11 @@
 #include "igt_dummyload.h"
 
 #define NOSLEEP 0
-#define SUSPEND_DEVICES 1
-#define SUSPEND 2
-#define HIBERNATE_DEVICES 3
-#define HIBERNATE 4
+#define IDLE 1
+#define SUSPEND_DEVICES 2
+#define SUSPEND 3
+#define HIBERNATE_DEVICES 4
+#define HIBERNATE 5
 #define mode(x) ((x) & 0xff)
 
 #define LOCAL_I915_EXEC_BSD_SHIFT      (13)
@@ -195,6 +196,11 @@ static void run_test(int fd, unsigned engine, unsigned flags)
 	case NOSLEEP:
 		break;
 
+	case IDLE:
+		igt_system_suspend_autoresume(SUSPEND_STATE_FREEZE,
+					      SUSPEND_TEST_NONE);
+		break;
+
 	case SUSPEND_DEVICES:
 		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
 					      SUSPEND_TEST_DEVICES);
@@ -255,6 +261,8 @@ igt_main
 
 	igt_subtest("basic")
 		run_test(fd, ALL_ENGINES, NOSLEEP);
+	igt_subtest("basic-S0")
+		run_test(fd, ALL_ENGINES, IDLE);
 	igt_subtest("basic-S3-devices")
 		run_test(fd, ALL_ENGINES, SUSPEND_DEVICES);
 	igt_subtest("basic-S3")
diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist
index e78e7fd0c..2553a68c3 100644
--- a/tests/intel-ci/fast-feedback.testlist
+++ b/tests/intel-ci/fast-feedback.testlist
@@ -56,6 +56,7 @@ igt@gem_exec_reloc@basic-write-read-active
 igt@gem_exec_reloc@basic-softpin
 igt@gem_exec_store@basic-all
 igt@gem_exec_suspend@basic
+igt@gem_exec_suspend@basic-s0
 igt@gem_exec_suspend@basic-s3
 igt@gem_exec_suspend@basic-s4-devices
 igt@gem_flink_basic@bad-flink
-- 
2.23.0

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

             reply	other threads:[~2019-10-07 11:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-07 11:06 Chris Wilson [this message]
2019-10-07 11:21 ` [igt-dev] ✗ GitLab.Pipeline: warning for i915/gem_exec_suspend: Exercise S0 (aka s2idle) Patchwork
2019-10-07 11:31 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-10-07 13:19 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-10-25 19:16 ` [igt-dev] [PATCH i-g-t] " Mika Kuoppala

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=20191007110651.10486-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