summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-07-20 12:45:57 +0200
committerSimon Ser <contact@emersion.fr>2023-07-27 16:10:41 +0200
commitc6013245ce9ce287bb86d327f9b6420a320a08e6 (patch)
tree2c540be5155bf9ac6d9d0af6d3e35852486a1184
parent431becd4e0dddf974aadd7bf7965b3a28b22dd23 (diff)
downloadlibdrm-c6013245ce9ce287bb86d327f9b6420a320a08e6.tar.gz
libdrm-c6013245ce9ce287bb86d327f9b6420a320a08e6.tar.bz2
libdrm-c6013245ce9ce287bb86d327f9b6420a320a08e6.zip
xf86drm: add drmSyncobjEventfd
This is a wrapper for DRM_IOCTL_SYNCOBJ_EVENTFD. Signed-off-by: Simon Ser <contact@emersion.fr>
-rw-r--r--core-symbols.txt1
-rw-r--r--xf86drm.c14
-rw-r--r--xf86drm.h2
3 files changed, 17 insertions, 0 deletions
diff --git a/core-symbols.txt b/core-symbols.txt
index 9f8a323b..0d3464e9 100644
--- a/core-symbols.txt
+++ b/core-symbols.txt
@@ -187,6 +187,7 @@ drmSLNext
drmSwitchToContext
drmSyncobjCreate
drmSyncobjDestroy
+drmSyncobjEventfd
drmSyncobjExportSyncFile
drmSyncobjFDToHandle
drmSyncobjHandleToFD
diff --git a/xf86drm.c b/xf86drm.c
index 2afb99e0..52b83ccc 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -5102,6 +5102,20 @@ drm_public int drmSyncobjTransfer(int fd,
return ret;
}
+drm_public int drmSyncobjEventfd(int fd, uint32_t handle, uint64_t point, int ev_fd,
+ uint32_t flags)
+{
+ struct drm_syncobj_eventfd args;
+
+ memclear(args);
+ args.handle = handle;
+ args.point = point;
+ args.fd = ev_fd;
+ args.flags = flags;
+
+ return drmIoctl(fd, DRM_IOCTL_SYNCOBJ_EVENTFD, &args);
+}
+
static char *
drmGetFormatModifierFromSimpleTokens(uint64_t modifier)
{
diff --git a/xf86drm.h b/xf86drm.h
index de756e88..1c38cb18 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -947,6 +947,8 @@ extern int drmSyncobjTransfer(int fd,
uint32_t dst_handle, uint64_t dst_point,
uint32_t src_handle, uint64_t src_point,
uint32_t flags);
+extern int drmSyncobjEventfd(int fd, uint32_t handle, uint64_t point, int ev_fd,
+ uint32_t flags);
extern char *
drmGetFormatModifierVendor(uint64_t modifier);