[Intel-gfx] [PATCH i-g-t v6 6/7] igt_kms: Change igt_wait_for_vblank to use helper function.
robert.foss at collabora.com
robert.foss at collabora.com
Thu May 19 00:07:08 UTC 2016
From: Robert Foss <robert.foss at collabora.com>
Change igt_wait_for_vblank() to use kmstest_get_vbl_flag() helper function.
Signed-off-by: Robert Foss <robert.foss at collabora.com>
---
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 0e781ef..9ca204c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -2493,11 +2493,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
More information about the Intel-gfx
mailing list