aboutsummaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-04 22:05:21 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2006-09-04 22:05:21 +0200
commitf88c32fd4cb93fe8b9dfa543a26d74733d0cd8ef (patch)
tree9ebb0ecc3ca1e75d255afa1203cf55d09c118db1 /libdrm
parent550f51b4bf9920718aab2c611b15de3020537f92 (diff)
Libdrm function headers. Some renaming.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c10
-rw-r--r--libdrm/xf86mm.h51
2 files changed, 56 insertions, 5 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 073fd0c4..068d0fb9 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2457,7 +2457,7 @@ static int drmAdjustListNodes(drmBOList *list)
return ret;
}
-static void drmFreeList(drmBOList *list)
+void drmBOFreeList(drmBOList *list)
{
drmBONode *node;
drmMMListHead *l;
@@ -2483,7 +2483,7 @@ static void drmFreeList(drmBOList *list)
}
}
-int drmResetList(drmBOList *list) {
+int drmBOResetList(drmBOList *list) {
drmMMListHead *l;
int ret;
@@ -2547,17 +2547,17 @@ void *drmBOListNext(drmBOList *list, void *iterator)
return ret;
}
-void drmBOListBuf(void *iterator, drmBO **buf)
+drmBO *drmBOListBuf(void *iterator)
{
drmBONode *node;
drmMMListHead *l = (drmMMListHead *) iterator;
node = DRMLISTENTRY(drmBONode, l, head);
- *buf = node->buf;
+ return node->buf;
}
-int drmCreateBufList(int numTarget, drmBOList *list)
+int drmBOCreateList(int numTarget, drmBOList *list)
{
DRMINITLISTHEAD(&list->list);
DRMINITLISTHEAD(&list->free);
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index a8458b15..623f4d58 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -117,12 +117,63 @@ typedef struct _drmBOList {
drmMMListHead free;
} drmBOList;
+
+/*
+ * TTM functions.
+ */
+
+extern int drmTTMCreate(int fd, drmTTM *ttm, unsigned long size,
+ unsigned flags);
+extern int drmTTMDestroy(int fd, const drmTTM *ttm);
+extern int drmTTMReference(int fd, unsigned handle, drmTTM *ttm);
+extern int drmTTMUnreference(int fd, const drmTTM *ttm);
+extern drm_handle_t drmTTMMapHandle(int fd, const drmTTM *ttm);
+
+/*
+ * Buffer object list functions.
+ */
+
+extern void drmBOFreeList(drmBOList *list);
+extern int drmBOResetList(drmBOList *list);
+extern void *drmBOListIterator(drmBOList *list);
+extern void *drmBOListNext(drmBOList *list, void *iterator);
+extern drmBO *drmBOListBuf(void *iterator);
+extern int drmBOCreateList(int numTarget, drmBOList *list);
+
+/*
+ * Buffer object functions.
+ */
+
extern int drmBOCreate(int fd, drmTTM *ttm, unsigned long start, unsigned long size,
void *user_buffer, drm_bo_type_t type, unsigned mask,
unsigned hint, drmBO *buf);
extern int drmBODestroy(int fd, drmBO *buf);
extern int drmBOReference(int fd, unsigned handle, drmBO *buf);
extern int drmBOUnReference(int fd, drmBO *buf);
+extern int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint,
+ void **address);
+extern int drmBOUnmap(int fd, drmBO *buf);
+extern int drmBOValidate(int fd, drmBO *buf, unsigned flags, unsigned mask,
+ unsigned hint);
+extern int drmBOFence(int fd, drmBO *buf, unsigned flags, unsigned fenceHandle);
+extern int drmBOInfo(int fd, drmBO *buf);
+extern int drmBufBusy(int fd, drmBO *buf, int *busy);
+
+
+extern int drmAddValidateItem(drmBOList *list, drmBO *buf, unsigned flags,
+ unsigned mask,
+ int *newItem);
+extern int drmBOValidateList(int fd, drmBOList *list);
+extern int drmBOFenceList(int fd, drmBOList *list, unsigned fenceHandle);
+
+
+/*
+ * Initialization functions.
+ */
+
+extern int drmMMInit(int fd, unsigned long vramPOffset, unsigned long vramPSize,
+ unsigned long ttPOffset, unsigned long ttPSize);
+extern int drmMMTakedown(int fd);
#endif