aboutsummaryrefslogtreecommitdiff
path: root/libdrm/xf86mm.h
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-15 11:18:35 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-15 11:18:35 +0200
commit49fbeb339c232804866cd548d6023fe559597353 (patch)
treefa4685050d7a91a7ee0e55f10093b4fa403a61aa /libdrm/xf86mm.h
parent7223b4e264a64df2df70715d8777f2ccaa883d5e (diff)
Some bugfixes.
Change the fence object interface somewhat to allow some more flexibility. Make list IOCTLS really restartable. Try to avoid busy-waits in the kernel using immediate return to user-space with an -EAGAIN.
Diffstat (limited to 'libdrm/xf86mm.h')
-rw-r--r--libdrm/xf86mm.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index 24e28245..4cb37e23 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -93,7 +93,22 @@ typedef struct _drmMMListHead
#define DRMLISTENTRY(__type, __item, __field) \
((__type *)(((char *) (__item)) - offsetof(__type, __field)))
-
+typedef struct _drmFence{
+ unsigned handle;
+ int class;
+ unsigned type;
+ unsigned flags;
+ unsigned signaled;
+} drmFence;
+
+typedef struct _drmTTM{
+ unsigned handle;
+ drm_handle_t user_token;
+ unsigned flags;
+ unsigned long size;
+ void *virtual;
+ int mapCount;
+} drmTTM;
typedef struct _drmBO{
drm_bo_type_t type;
@@ -130,6 +145,23 @@ typedef struct _drmBOList {
drmMMListHead free;
} drmBOList;
+/* Fencing */
+
+extern int drmFenceCreate(int fd, unsigned flags, int class,
+ unsigned type,
+ drmFence *fence);
+extern int drmFenceDestroy(int fd, const drmFence *fence);
+extern int drmFenceReference(int fd, unsigned handle, drmFence *fence);
+extern int drmFenceUnreference(int fd, const drmFence *fence);
+extern int drmFenceFlush(int fd, drmFence *fence, unsigned flush_type);
+extern int drmFenceSignaled(int fd, drmFence *fence,
+ unsigned fenceType, int *signaled);
+extern int drmFenceWait(int fd, unsigned flags, drmFence *fence,
+ unsigned flush_type);
+extern int drmFenceEmit(int fd, unsigned flags, drmFence *fence,
+ unsigned emit_type);
+extern int drmFenceBuffers(int fd, unsigned flags, drmFence *fence);
+
/*
* TTM functions.