summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-06-22 20:49:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-06-22 20:53:21 +0100
commit8453d4bb7a901c6a7601fc8a13b47701cbb38db4 (patch)
tree1200cf9473da5ee336b2c74b5910fbd129b35ba6
parent987e1d56505b676530ecc667792c0f3c69b78f76 (diff)
igt/kms_cursor_legacy: Replace synchronous pageflip
Aparently we never supported that mode of operation. Maybe in the future we will, but for now just use the vblank wait to align ourselves with the vblank. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/kms_cursor_legacy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 7756b691..00890c95 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -286,7 +286,7 @@ static void basic_flip(struct data *data)
struct igt_fb fb_info;
unsigned vblank_start;
int target;
- char buf[128];
+ struct drm_event buf;
uint32_t fb_id;
memset(&arg, 0, sizeof(arg));
@@ -324,10 +324,9 @@ static void basic_flip(struct data *data)
do_ioctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
igt_assert_eq(get_vblank(data->fd, 0, 0), vblank_start);
- /* Start with a synchronous flip to align with the vblank */
- do_or_die(drmModePageFlip(data->fd, arg.crtc_id, fb_id, 0, NULL));
+ /* Start with a synchronous query to align with the vblank */
+ vblank_start = get_vblank(data->fd, 0, DRM_VBLANK_NEXTONMISS);
do_ioctl(data->fd, DRM_IOCTL_MODE_CURSOR, &arg);
- vblank_start = get_vblank(data->fd, 0, 0);
/* Schedule a nonblocking flip for the next vblank */
do_or_die(drmModePageFlip(data->fd, arg.crtc_id, fb_id,
@@ -339,7 +338,7 @@ static void basic_flip(struct data *data)
igt_assert_eq(get_vblank(data->fd, 0, 0), vblank_start);
igt_set_timeout(1, "Stuck page flip");
- read(data->fd, buf, sizeof(buf));
+ read(data->fd, &buf, sizeof(buf));
igt_assert_eq(get_vblank(data->fd, 0, 0), vblank_start + 1);
igt_reset_timeout();