From: Robert Foss <[email protected]>

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

Signed-off-by: Robert Foss <[email protected]>
---
 lib/igt_kms.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

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);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to