From aff8aa16762b190fef51738f5a36e94d3ebda091 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 13 Jan 2018 19:17:34 +0000 Subject: 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 Reviewed-by: Tvrtko Ursulin --- tests/pm_rps.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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); -- cgit v1.2.3