summaryrefslogtreecommitdiff
path: root/tests/kms_busy.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/kms_busy.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/kms_busy.c')
-rw-r--r--tests/kms_busy.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index 4a4e0e15..abf39828 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -84,7 +84,8 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
struct drm_event_vblank ev;
igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
- 0, ring, fb->gem_handle);
+ .engine = ring,
+ .dependency = fb->gem_handle);
if (modeset) {
/*
@@ -200,7 +201,8 @@ static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary,
struct igt_fb *busy_fb, unsigned ring)
{
igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
- 0, ring, busy_fb->gem_handle);
+ .engine = ring,
+ .dependency = busy_fb->gem_handle);
struct pollfd pfd = { .fd = dpy->drm_fd, .events = POLLIN };
unsigned flags = 0;
struct drm_event_vblank ev;
@@ -287,7 +289,9 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy,
igt_display_commit2(dpy, dpy->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
- t = igt_spin_batch_new(dpy->drm_fd, 0, ring, fb.gem_handle);
+ t = igt_spin_batch_new(dpy->drm_fd,
+ .engine = ring,
+ .dependency = fb.gem_handle);
do_or_die(drmModePageFlip(dpy->drm_fd, dpy->pipes[pipe].crtc_id, fb.fb_id, DRM_MODE_PAGE_FLIP_EVENT, &fb));