diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-05-11 17:10:15 +0100 |
---|---|---|
committer | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2017-05-11 17:50:37 +0100 |
commit | 31530827e513a5ced092bb1777b0a23a5010af2c (patch) | |
tree | 7788a20745474f59b1de4ff7613fc28ce64ce3eb /benchmarks/gem_wsim.c | |
parent | 3ecd6c7f47e3b76e3010f254af76d5f6c981b557 (diff) |
gem_wsim: Minimize startup gap
Do the GPU quiesce as close as possible in time to the start of
the workload in order to minimize the gap in engine utilization
tracking.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'benchmarks/gem_wsim.c')
-rw-r--r-- | benchmarks/gem_wsim.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index a3eb56d0..58a428ab 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -1579,7 +1579,15 @@ int main(int argc, char **argv) double t; int i, c; - fd = drm_open_driver(DRIVER_INTEL); + /* + * Open the device via the low-level API so we can do the GPU quiesce + * manually as close as possible in time to the start of the workload. + * This minimizes the gap in engine utilization tracking when observed + * via external tools like trace.pl. + */ + fd = __drm_open_driver(DRIVER_INTEL); + igt_require(fd); + init_clocks(); while ((c = getopt(argc, argv, "hqv2RSHxc:n:r:w:W:t:b:")) != -1) { @@ -1745,6 +1753,8 @@ int main(int argc, char **argv) prepare_workload(i, w[i], flags_); } + gem_quiescent_gpu(fd); + clock_gettime(CLOCK_MONOTONIC, &t_start); igt_fork(child, clients) { |