public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v3 1/1] i915_pm_rpm: gem-execbuf-stress-extra-wait faster
@ 2019-03-14  0:46 Caz Yokoyama
  2019-03-13 20:03 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Caz Yokoyama @ 2019-03-14  0:46 UTC (permalink / raw)
  To: igt-dev

Replace (5sec * 10) delay by forcing to suspended state.
While this patch expects a corresponding patch in drm-tip,
the test runs successful without the corresponding patch.
Its runtime is 2-3 sec on my local machine, nuc.

Signed-off-by: Caz Yokoyama <caz.yokoyama@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_debugfs.h        |  7 +++++++
 tests/i915/i915_pm_rpm.c | 11 ++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index b9cf0f81..9fa38b42 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -216,6 +216,13 @@ void igt_require_hpd_storm_ctl(int fd);
 		  DROP_FREED | \
 		  DROP_IDLE)
 
+/**
+ * DROP_SUSPEND:
+ *
+ * force to suspended state.
+ */
+#define DROP_SUSPEND 0x200
+
 void igt_reset_fifo_underrun_reporting(int drm_fd);
 
 bool igt_drop_caches_has(int fd, uint64_t val);
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index be296f52..e9193114 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1338,12 +1338,17 @@ static void gem_execbuf_stress_subtest(int rounds, int wait_flags)
 	for (i = 0; i < rounds; i++) {
 		gem_execbuf(drm_fd, &execbuf);
 
-		if (wait_flags & WAIT_STATUS)
+		if (wait_flags & WAIT_STATUS) {
+			/* clean up idle work */
+			igt_drop_caches_set(drm_fd, DROP_IDLE);
 			igt_assert(wait_for_suspended());
+		}
 		if (wait_flags & WAIT_PC8_RES)
 			igt_assert(pc8_plus_residency_changed(30));
-		if (wait_flags & WAIT_EXTRA)
-			sleep(5);
+		if (wait_flags & WAIT_EXTRA) {
+			/* force to suspend state */
+			igt_drop_caches_set(drm_fd, DROP_SUSPEND);
+		}
 	}
 
 	gem_close(drm_fd, handle);
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-14  3:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-14  0:46 [igt-dev] [PATCH i-g-t v3 1/1] i915_pm_rpm: gem-execbuf-stress-extra-wait faster Caz Yokoyama
2019-03-13 20:03 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,v3,1/1] " Patchwork
2019-03-13 21:12 ` [igt-dev] [PATCH i-g-t v3 1/1] " Chris Wilson
2019-03-13 22:29   ` Caz Yokoyama
2019-03-14  3:04 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v3,1/1] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox