summaryrefslogtreecommitdiff
path: root/libdrm/xf86mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86mm.h')
-rw-r--r--libdrm/xf86mm.h80
1 files changed, 26 insertions, 54 deletions
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index b3822d4d..d3df8497 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -29,6 +29,7 @@
#ifndef _XF86MM_H_
#define _XF86MM_H_
#include <stddef.h>
+#include <stdint.h>
#include "drm.h"
/*
@@ -37,7 +38,7 @@
* be protected using an external mutex.
*
* Note: Don't protect the following functions, as it may lead to deadlocks:
- * drmBOUnmap(), drmFenceBuffers().
+ * drmBOUnmap().
* The kernel is synchronizing and refcounting buffer maps.
* User space only needs to refcount object usage within the same application.
*/
@@ -96,20 +97,20 @@ typedef struct _drmMMListHead
typedef struct _drmFence
{
unsigned handle;
- int class;
+ int fence_class;
unsigned type;
unsigned flags;
unsigned signaled;
+ uint32_t sequence;
unsigned pad[4]; /* for future expansion */
} drmFence;
typedef struct _drmBO
{
- drm_bo_type_t type;
unsigned handle;
- drm_u64_t mapHandle;
- unsigned flags;
- unsigned mask;
+ uint64_t mapHandle;
+ uint64_t flags;
+ uint64_t mask;
unsigned mapFlags;
unsigned long size;
unsigned long offset;
@@ -117,37 +118,21 @@ typedef struct _drmBO
unsigned replyFlags;
unsigned fenceFlags;
unsigned pageAlignment;
+ unsigned tileInfo;
+ unsigned hwTileStride;
+ unsigned desiredTileStride;
void *virtual;
void *mapVirtual;
int mapCount;
unsigned pad[8]; /* for future expansion */
} drmBO;
-typedef struct _drmBONode
-{
- drmMMListHead head;
- drmBO *buf;
- drm_bo_arg_t bo_arg;
- unsigned long arg0;
- unsigned long arg1;
-} drmBONode;
-
-typedef struct _drmBOList {
- unsigned numTarget;
- unsigned numCurrent;
- unsigned numOnList;
- drmMMListHead list;
- drmMMListHead free;
-} drmBOList;
-
-
/*
* Fence functions.
*/
-extern int drmFenceCreate(int fd, unsigned flags, int class,
+extern int drmFenceCreate(int fd, unsigned flags, int fence_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);
@@ -157,46 +142,25 @@ 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);
+extern int drmFenceBuffers(int fd, unsigned flags, uint32_t fence_class, drmFence *fence);
/*
- * 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, unsigned long start, unsigned long size,
- unsigned pageAlignment,void *user_buffer,
- drm_bo_type_t type, unsigned mask,
- unsigned hint, drmBO *buf);
-extern int drmBODestroy(int fd, drmBO *buf);
+extern int drmBOCreate(int fd, unsigned long size,
+ unsigned pageAlignment, void *user_buffer,
+ uint64_t mask, unsigned hint, drmBO *buf);
extern int drmBOReference(int fd, unsigned handle, drmBO *buf);
-extern int drmBOUnReference(int fd, 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 drmBOBusy(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);
extern int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint);
/*
@@ -206,8 +170,16 @@ extern int drmBOWaitIdle(int fd, drmBO *buf, unsigned hint);
extern int drmMMInit(int fd, unsigned long pOffset, unsigned long pSize,
unsigned memType);
extern int drmMMTakedown(int fd, unsigned memType);
-extern int drmMMLock(int fd, unsigned memType);
-extern int drmMMUnlock(int fd, unsigned memType);
+extern int drmMMLock(int fd, unsigned memType, int lockBM, int ignoreNoEvict);
+extern int drmMMUnlock(int fd, unsigned memType, int unlockBM);
+extern int drmBOSetStatus(int fd, drmBO *buf,
+ uint64_t flags, uint64_t mask,
+ unsigned int hint,
+ unsigned int desired_tile_stride,
+ unsigned int tile_info);
+extern int drmBOVersion(int fd, unsigned int *major,
+ unsigned int *minor,
+ unsigned int *patchlevel);
#endif