aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák2017-09-11 14:57:32 -0500
committerMarek Olšák2017-10-12 13:35:57 -0500
commit2048a9e7278d64954080077fb29d603fbb611873 (patch)
treea7b3843e561cbd31d331fe32e9a7abdda19887f9 /xf86drm.c
parentb6e24501a1f8c58501fdfa39b435e440ee667feb (diff)
downloadexternal-libdrm-2048a9e7278d64954080077fb29d603fbb611873.tar.gz
external-libdrm-2048a9e7278d64954080077fb29d603fbb611873.tar.xz
external-libdrm-2048a9e7278d64954080077fb29d603fbb611873.zip
drm: add drmSyncobjWait wrapper
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/xf86drm.c b/xf86drm.c
index 6ea01129..8a327170 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -4225,3 +4225,25 @@ int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd)
4225 *sync_file_fd = args.fd; 4225 *sync_file_fd = args.fd;
4226 return 0; 4226 return 0;
4227} 4227}
4228
4229int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
4230 int64_t timeout_nsec, unsigned flags,
4231 uint32_t *first_signaled)
4232{
4233 struct drm_syncobj_wait args;
4234 int ret;
4235
4236 memclear(args);
4237 args.handles = (intptr_t)handles;
4238 args.timeout_nsec = timeout_nsec;
4239 args.count_handles = num_handles;
4240 args.flags = flags;
4241
4242 ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_WAIT, &args);
4243 if (ret < 0)
4244 return ret;
4245
4246 if (first_signaled)
4247 *first_signaled = args.first_signaled;
4248 return ret;
4249}