summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2019-04-16 16:38:45 +0300
committerImre Deak <imre.deak@intel.com>2019-04-16 17:34:04 +0300
commitd196925ed16221768689efa1ea06c4869e9fc2a9 (patch)
tree9b825dd2ac9550454ef1dd222110bccfb6e6351e
parentcc9a60c029432b5843724e4f2c57f9f815f7adbb (diff)
tests/perf: Fix timeout for RC6 re-enabling
After closing the perf stream the parking the GPU engines may easily take more than 1 second: releasing the FD itself results in a new request submission via i915_perf_release()->i915_oa_stream_destroy()-> gen8_disable_metric_set(). That means a >1sec delay for the delayed unpark to be called due to the delay from queue_delayed_work(retire_work, round_jiffies_up_relative(HZ)) + the delay from mod_delayed_work(idle_work, msecs_to_jiffies(100)) Scheduling may push this delay even further, I measured >2sec delays on my GLK. Fix this by calling gem_quiescent_gpu() which syncs up with the idle work, thus making sure we'll see RC6 residency afterwards. v2: - Use gem_quiescent_gpu() instead of increasing the timeout. (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103179 Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-rw-r--r--tests/perf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/perf.c b/tests/perf.c
index 4307d36a..f2c0aeb8 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -3604,6 +3604,7 @@ test_rc6_disable(void)
igt_assert_eq(n_events_end - n_events_start, 0);
__perf_close(stream_fd);
+ gem_quiescent_gpu(drm_fd);
n_events_start = rc6_residency_ms();
nanosleep(&(struct timespec){ .tv_sec = 1, .tv_nsec = 0 }, NULL);