aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBas Nieuwenhuizen2017-12-16 17:27:09 -0600
committerDave Airlie2017-12-17 17:51:50 -0600
commit1abccedc4d18305e8c3e3dd00d3262c134ef1d44 (patch)
treee75ab1c0579e1985251b813f7955119569e6068f /xf86drm.c
parent7d984e609470aa38d4c3f7d48e26fa763a03af13 (diff)
downloadexternal-libgbm-1abccedc4d18305e8c3e3dd00d3262c134ef1d44.tar.gz
external-libgbm-1abccedc4d18305e8c3e3dd00d3262c134ef1d44.tar.xz
external-libgbm-1abccedc4d18305e8c3e3dd00d3262c134ef1d44.zip
drm: Add drmSyncobjReset & drmSyncobjSignal wrappers.
anv already uses the ioctls but does not use libdrm, so these were not wrapped yet. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'xf86drm.c')
-rw-r--r--xf86drm.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xf86drm.c b/xf86drm.c
index c44621c1..deb76e4b 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -4247,3 +4247,29 @@ int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
4247 *first_signaled = args.first_signaled; 4247 *first_signaled = args.first_signaled;
4248 return ret; 4248 return ret;
4249} 4249}
4250
4251int drmSyncobjReset(int fd, const uint32_t *handles, uint32_t handle_count)
4252{
4253 struct drm_syncobj_array args;
4254 int ret;
4255
4256 memclear(args);
4257 args.handles = (uintptr_t)handles;
4258 args.count_handles = handle_count;
4259
4260 ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_RESET, &args);
4261 return ret;
4262}
4263
4264int drmSyncobjSignal(int fd, const uint32_t *handles, uint32_t handle_count)
4265{
4266 struct drm_syncobj_array args;
4267 int ret;
4268
4269 memclear(args);
4270 args.handles = (uintptr_t)handles;
4271 args.count_handles = handle_count;
4272
4273 ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_SIGNAL, &args);
4274 return ret;
4275}