summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-05 18:00:25 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-05 18:00:25 +0200
commit604215396847a7964fd7d68aa89d4f778b3bf22b (patch)
tree68679011047b400c8e86247e493244a40873bdd8 /libdrm
parent034fc31292edaa25779a938ab3e92ef34697eaf9 (diff)
Fence all unfenced buffers function.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c15
-rw-r--r--libdrm/xf86drm.h1
2 files changed, 16 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 068d0fb9..6d087427 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2259,6 +2259,21 @@ int drmFenceCreate(int fd, int shareable, int class,unsigned type,
fence->signaled = 0;
return 0;
}
+
+int drmFenceBuffers(int fd, int shareable, drmFence *fence)
+{
+ drm_fence_arg_t arg;
+
+ arg.flags = (shareable) ? DRM_FENCE_FLAG_SHAREABLE : 0;
+ arg.op = drm_fence_buffers;
+ if (ioctl(fd, DRM_IOCTL_FENCE, &arg))
+ return -errno;
+ fence->handle = arg.handle;
+ fence->class = arg.class;
+ fence->type = arg.type;
+ fence->signaled = 0;
+ return 0;
+}
int drmFenceDestroy(int fd, const drmFence *fence)
{
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index f257deda..be1eeeff 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -626,6 +626,7 @@ extern int drmFenceSignaled(int fd, drmFence *fence);
extern int drmFenceWait(int fd, drmFence *fence, unsigned flush_type,
int lazy, int ignore_signals);
extern int drmFenceEmit(int fd, drmFence *fence, unsigned emit_type);
+extern int drmFenceBuffers(int fd, int shareable, drmFence *fence);
/* TTMS */
extern int drmTTMCreate(int fd, drmTTM *ttm, unsigned long size,