diff mbox

[i-g-t,v5,6/7] igt_kms: Change igt_wait_for_vblank to use helper function.

Message ID 1463405912-1592-7-git-send-email-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss May 16, 2016, 1:38 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

Change igt_wait_for_vblank() to use kmstest_get_vbl_flag() helper function.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 lib/igt_kms.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 5ef73c8..bc022c8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2488,11 +2488,13 @@  void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background)
 void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
 {
 	drmVBlank wait_vbl;
+	uint32_t pipe_id_flag;
 
 	memset(&wait_vbl, 0, sizeof(wait_vbl));
+	pipe_id_flag = kmstest_get_vbl_flag(pipe);
 
-	wait_vbl.request.type = pipe << DRM_VBLANK_HIGH_CRTC_SHIFT |
-				DRM_VBLANK_RELATIVE;
+	wait_vbl.request.type = DRM_VBLANK_RELATIVE;
+	wait_vbl.request.type |= pipe_id_flag;
 	wait_vbl.request.sequence = 1;
 
 	igt_assert(drmWaitVBlank(drm_fd, &wait_vbl) == 0);