summaryrefslogtreecommitdiff
path: root/lib/igt_kms.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-26 10:19:42 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-03-26 18:50:28 +0100
commit64401f57e958998d537ff67525d5f1e9a4f76b22 (patch)
treea1f660fe595754a9f1515a59d09d797bb1665a67 /lib/igt_kms.c
parent9aea7ae541212e4116af8d5d922d7cbcc571df50 (diff)
lib: fold igt_display into igt_kms
For 1 function and 2 types we kinda don't need separate files. Especially now that igt_kms is much more focused on the actual modeset stuff with all the framebuffer helpers extracted to igt_fb. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r--lib/igt_kms.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 1d4bad45..678cf391 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -993,3 +993,16 @@ void igt_plane_set_position(igt_plane_t *plane, int x, int y)
plane->position_changed = true;
}
+
+void igt_wait_for_vblank(int drm_fd, enum pipe pipe)
+{
+ drmVBlank wait_vbl;
+
+ memset(&wait_vbl, 0, sizeof(wait_vbl));
+
+ wait_vbl.request.type = pipe << DRM_VBLANK_HIGH_CRTC_SHIFT |
+ DRM_VBLANK_RELATIVE;
+ wait_vbl.request.sequence = 1;
+
+ igt_assert(drmWaitVBlank(drm_fd, &wait_vbl) == 0);
+}