From a765aa108105804c19096554447ad0cb71f64fc3 Mon Sep 17 00:00:00 2001 From: Mika Kuoppala Date: Wed, 17 Apr 2019 18:28:33 +0300 Subject: lib/igt_dummyload: Get rid of 'batch' on spinner accessors There is no guarantee that spinners are and will be implemented using batches. As we have igt_spin_t, manipulate it through igt_spin_* functions consistently and hide the batch nature. Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson --- tests/kms_busy.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'tests/kms_busy.c') diff --git a/tests/kms_busy.c b/tests/kms_busy.c index 321db820..66f26cd0 100644 --- a/tests/kms_busy.c +++ b/tests/kms_busy.c @@ -76,9 +76,9 @@ static void flip_to_fb(igt_display_t *dpy, int pipe, const int timeout = modeset ? 8500 : 100; struct drm_event_vblank ev; - igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd, - .engine = ring, - .dependency = fb->gem_handle); + igt_spin_t *t = igt_spin_new(dpy->drm_fd, + .engine = ring, + .dependency = fb->gem_handle); if (modeset) { /* @@ -115,7 +115,7 @@ static void flip_to_fb(igt_display_t *dpy, int pipe, igt_waitchildren_timeout(5 * timeout, "flip blocked waiting for busy bo\n"); - igt_spin_batch_end(t); + igt_spin_end(t); igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev)); igt_assert(poll(&pfd, 1, 0) == 0); @@ -131,7 +131,7 @@ static void flip_to_fb(igt_display_t *dpy, int pipe, igt_display_commit2(dpy, COMMIT_ATOMIC); } - igt_spin_batch_free(dpy->drm_fd, t); + igt_spin_free(dpy->drm_fd, t); } static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset) @@ -180,9 +180,9 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset) 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, - .engine = ring, - .dependency = busy_fb->gem_handle); + igt_spin_t *t = igt_spin_new(dpy->drm_fd, + .engine = ring, + .dependency = busy_fb->gem_handle); struct pollfd pfd = { .fd = dpy->drm_fd, .events = POLLIN }; unsigned flags = 0; struct drm_event_vblank ev; @@ -210,7 +210,7 @@ static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary, igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev)); - igt_spin_batch_end(t); + igt_spin_end(t); } static void test_hang(igt_display_t *dpy, unsigned ring, @@ -269,9 +269,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, - .engine = ring, - .dependency = fb.gem_handle); + t = igt_spin_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)); @@ -282,7 +282,7 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy, igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev)); - igt_spin_batch_end(t); + igt_spin_end(t); igt_remove_fb(dpy->drm_fd, &fb); } -- cgit v1.2.3