summaryrefslogtreecommitdiff
path: root/tests/kms_busy.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2019-04-17 18:28:33 +0300
committerMika Kuoppala <mika.kuoppala@linux.intel.com>2019-04-18 17:04:09 +0300
commita765aa108105804c19096554447ad0cb71f64fc3 (patch)
tree5570cc9b5c6a733268d56a3a96939873d254e61b /tests/kms_busy.c
parent226b9995d1fb486d34cd35428025b55532e9e3d1 (diff)
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 <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/kms_busy.c')
-rw-r--r--tests/kms_busy.c26
1 files changed, 13 insertions, 13 deletions
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);
}