Skip to content
Snippets Groups Projects
Commit 18a9f32e authored by Chris Wilson's avatar Chris Wilson :thinking:
Browse files

i915/i915_pm_rps: Tighten fence generation for waitboost


We need the object we wait on to be clean, and free of stray fences as
the waitboosting only applies to i915_request that have not been
started. If we use an exclusive fence (from a write dependency) that
will strip off any foreign fences, allowing us to trick the driver into
behaving as we expect.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
parent f66c71e2
No related branches found
No related tags found
No related merge requests found
...@@ -538,26 +538,15 @@ static void stabilize_check(int *out) ...@@ -538,26 +538,15 @@ static void stabilize_check(int *out)
igt_debug("Waited %d msec to stabilize cur\n", wait); 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) static void boost_freq(int fd, int *boost_freqs)
{ {
int64_t timeout = 1; int64_t timeout = 1;
igt_spin_t *load; igt_spin_t *load;
load = igt_spin_new(fd); load = igt_spin_new(fd);
resubmit_batch(fd, load->handle, 16);
/* Strip off extra fences from the object, and keep it from starting */
igt_spin_free(fd, igt_spin_new(fd, .dependency = load->handle));
/* Waiting will grant us a boost to maximum */ /* Waiting will grant us a boost to maximum */
gem_wait(fd, load->handle, &timeout); gem_wait(fd, load->handle, &timeout);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment