summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bgi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/bgi.c b/src/bgi.c
index e8a8a79..b0ed349 100644
--- a/src/bgi.c
+++ b/src/bgi.c
@@ -75,6 +75,14 @@ static void fbdev_write(fuse_req_t req, const char *buf, size_t size,
fb->pos += size;
}
+static int wait_vblank_sync(struct kms_fb *fb)
+{
+ union drm_wait_vblank vblank = {};
+ vblank.request.type = _DRM_VBLANK_RELATIVE;
+ vblank.request.sequence = 1;
+ return ioctl(drmfd, DRM_IOCTL_WAIT_VBLANK, &vblank);
+}
+
static int wait_vblank(struct kms_fb *fb)
{
char buffer[1024];
@@ -319,7 +327,7 @@ static void fbdev_ioctl(fuse_req_t req, int cmd, void *arg,
break;
case FBIO_WAITFORVSYNC:
if (fb->vsync.e != NEVER)
- wait_vblank(fb);
+ wait_vblank_sync(fb);
fuse_reply_ioctl(req, 0, NULL, 0);
break;
case FBIOGET_FSCREENINFO: