aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xf86drm.c22
-rw-r--r--xf86drm.h3
2 files changed, 25 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}
diff --git a/xf86drm.h b/xf86drm.h
index 2855a3ee..ea650eff 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -860,6 +860,9 @@ extern int drmSyncobjFDToHandle(int fd, int obj_fd, uint32_t *handle);
860 860
861extern int drmSyncobjImportSyncFile(int fd, uint32_t handle, int sync_file_fd); 861extern int drmSyncobjImportSyncFile(int fd, uint32_t handle, int sync_file_fd);
862extern int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd); 862extern int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd);
863extern int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
864 int64_t timeout_nsec, unsigned flags,
865 uint32_t *first_signaled);
863 866
864#if defined(__cplusplus) 867#if defined(__cplusplus)
865} 868}