summaryrefslogtreecommitdiff
path: root/tests/pm_rps.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-06-25 13:27:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-06 14:29:35 +0100
commit4b57f85b31f01701584190dd2f0adbc9563562be (patch)
tree80902143e54703a7688c4e383703ca876340cb30 /tests/pm_rps.c
parentf4a60b943391519aa95bcd6aa2a4a7f9ed34d084 (diff)
lib: Convert spin batch constructor to a factory
In order to make adding more options easier, expose the full set of options to the caller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/pm_rps.c')
-rw-r--r--tests/pm_rps.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/pm_rps.c b/tests/pm_rps.c
index 006d084b..202132b1 100644
--- a/tests/pm_rps.c
+++ b/tests/pm_rps.c
@@ -235,9 +235,9 @@ static void load_helper_run(enum load load)
igt_debug("Applying %s load...\n", lh.load ? "high" : "low");
- spin[0] = __igt_spin_batch_new(drm_fd, 0, 0, 0);
+ spin[0] = __igt_spin_batch_new(drm_fd);
if (lh.load == HIGH)
- spin[1] = __igt_spin_batch_new(drm_fd, 0, 0, 0);
+ spin[1] = __igt_spin_batch_new(drm_fd);
while (!lh.exit) {
handle = spin[0]->handle;
igt_spin_batch_end(spin[0]);
@@ -248,8 +248,7 @@ static void load_helper_run(enum load load)
usleep(100);
spin[0] = spin[1];
- spin[lh.load == HIGH] =
- __igt_spin_batch_new(drm_fd, 0, 0, 0);
+ spin[lh.load == HIGH] = __igt_spin_batch_new(drm_fd);
}
handle = spin[0]->handle;
@@ -510,7 +509,7 @@ 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);
+ load = igt_spin_batch_new(fd);
resubmit_batch(fd, load->handle, 16);
/* Waiting will grant us a boost to maximum */