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>main
parent
7d984e6094
commit
1abccedc4d
26
xf86drm.c
26
xf86drm.c
|
@ -4247,3 +4247,29 @@ int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
|
||||||
*first_signaled = args.first_signaled;
|
*first_signaled = args.first_signaled;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int drmSyncobjReset(int fd, const uint32_t *handles, uint32_t handle_count)
|
||||||
|
{
|
||||||
|
struct drm_syncobj_array args;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
memclear(args);
|
||||||
|
args.handles = (uintptr_t)handles;
|
||||||
|
args.count_handles = handle_count;
|
||||||
|
|
||||||
|
ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_RESET, &args);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int drmSyncobjSignal(int fd, const uint32_t *handles, uint32_t handle_count)
|
||||||
|
{
|
||||||
|
struct drm_syncobj_array args;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
memclear(args);
|
||||||
|
args.handles = (uintptr_t)handles;
|
||||||
|
args.count_handles = handle_count;
|
||||||
|
|
||||||
|
ret = drmIoctl(fd, DRM_IOCTL_SYNCOBJ_SIGNAL, &args);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
|
@ -863,6 +863,8 @@ extern int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd);
|
||||||
extern int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
|
extern int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,
|
||||||
int64_t timeout_nsec, unsigned flags,
|
int64_t timeout_nsec, unsigned flags,
|
||||||
uint32_t *first_signaled);
|
uint32_t *first_signaled);
|
||||||
|
extern int drmSyncobjReset(int fd, const uint32_t *handles, uint32_t handle_count);
|
||||||
|
extern int drmSyncobjSignal(int fd, const uint32_t *handles, uint32_t handle_count);
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue