diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-13 19:17:34 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-18 12:00:23 +0000 |
commit | aff8aa16762b190fef51738f5a36e94d3ebda091 (patch) | |
tree | 730c8a879e1679e3295a195d907f6fa2cd65276e | |
parent | 319a1de94c363863d70b1ec8950d55894a903cbb (diff) |
igt/pm_rps: Increase load for waitboosting
The waitboost subtests encode internal knowledge of the kernel, and
should we wish to change how the kernel functions, we also need to
update the test (or reconfigure it somehow to express desired latencies
for certain workloads). One such change proposed is to remove the
waitboost if the target request is also completed, so update the test to
not wait on the current batch.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r-- | tests/pm_rps.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pm_rps.c b/tests/pm_rps.c index a48ca368..8dd73917 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -487,12 +487,27 @@ static void stabilize_check(int *out) igt_debug("Waited %d msec to stabilize cur\n", wait); } +static void resubmit_batch(int fd, uint32_t handle, int count) +{ + struct drm_i915_gem_exec_object2 obj = { + .handle = handle + }; + struct drm_i915_gem_execbuffer2 eb = { + .buffer_count = 1, + .buffers_ptr = to_user_pointer(&obj), + }; + while (count--) + gem_execbuf(fd, &eb); +} + static void boost_freq(int fd, int *boost_freqs) { int64_t timeout = 1; igt_spin_t *load; load = igt_spin_batch_new(fd, 0, 0, 0); + resubmit_batch(fd, load->handle, 16); + /* Waiting will grant us a boost to maximum */ gem_wait(fd, load->handle, &timeout); |