summaryrefslogtreecommitdiff
path: root/shared-core/drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core/drm.h')
-rw-r--r--shared-core/drm.h127
1 files changed, 126 insertions, 1 deletions
diff --git a/shared-core/drm.h b/shared-core/drm.h
index 87f8da6b..726a5140 100644
--- a/shared-core/drm.h
+++ b/shared-core/drm.h
@@ -259,7 +259,8 @@ typedef enum drm_map_type {
_DRM_SHM = 2, /**< shared, cached */
_DRM_AGP = 3, /**< AGP/GART */
_DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
- _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */
+ _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */
+ _DRM_TTM = 6
} drm_map_type_t;
/**
@@ -629,6 +630,126 @@ typedef struct drm_set_version {
int drm_dd_minor;
} drm_set_version_t;
+#define DRM_FENCE_FLAG_EMIT 0x00000001
+#define DRM_FENCE_FLAG_SHAREABLE 0x00000002
+#define DRM_FENCE_FLAG_WAIT_LAZY 0x00000004
+#define DRM_FENCE_FLAG_WAIT_IGNORE_SIGNALS 0x00000008
+
+#define DRM_FENCE_EXE 0x00000001
+
+typedef struct drm_fence_arg {
+ unsigned handle;
+ int class;
+ unsigned type;
+ unsigned flags;
+ unsigned signaled;
+ enum {
+ drm_fence_create,
+ drm_fence_destroy,
+ drm_fence_reference,
+ drm_fence_unreference,
+ drm_fence_signaled,
+ drm_fence_flush,
+ drm_fence_wait,
+ drm_fence_emit
+ } op;
+} drm_fence_arg_t;
+
+#define DRM_BO_FLAG_READ 0x00000001
+#define DRM_BO_FLAG_WRITE 0x00000002
+#define DRM_BO_FLAG_EXE 0x00000004
+#define DRM_BO_FLAG_NO_MOVE 0x00000008
+#define DRM_BO_FLAG_NO_EVICT 0x00000010
+#define DRM_BO_FLAG_SHADOW_VRAM 0x00000020
+#define DRM_BO_FLAG_READ_LOCAL 0x00000040
+#define DRM_BO_FLAG_UNCACHED 0x00000080
+
+
+#define DRM_BO_FLAG_MEM_TT 0x01000000
+#define DRM_BO_FLAG_MEM_VRAM 0x02000000
+#define DRM_BO_FLAG_MEM_LOCAL 0x04000000
+#define DRM_BO_MASK_MEM 0xFFFFFFFF
+
+#define DRM_BO_HINT_PREFER_VRAM 0x00000001
+#define DRM_BO_HINT_AVOID_LOCAL 0x00000002
+#define DRM_BO_HINT_DONT_BLOCK 0x00000004
+
+/*
+ * Multiplexing ioctl argument.
+ */
+
+typedef struct drm_bo_arg {
+ unsigned num_requests;
+ enum {
+ drm_op_bo,
+ drm_op_ttm
+ } op;
+ unsigned data_lo;
+ unsigned data_hi;
+} drm_bo_arg_t;
+
+#define DRM_TTM_FLAG_SHAREABLE 0x00000001
+
+typedef struct drm_ttm_arg {
+ enum {
+ drm_ttm_create,
+ drm_ttm_destroy,
+ drm_ttm_reference,
+ drm_ttm_unreference
+ } op;
+ unsigned handle;
+ unsigned user_token;
+ unsigned size_lo;
+ unsigned size_hi;
+ unsigned flags;
+}drm_ttm_arg_t;
+
+
+typedef struct drm_bo_arg_request {
+ unsigned handle; /* User space handle */
+ unsigned mask;
+ unsigned hint;
+ unsigned size_lo;
+ unsigned size_hi;
+
+ enum {
+ drm_bo_type_ttm,
+ drm_bo_type_dc,
+ drm_bo_type_user
+ }type;
+ unsigned arg_handle;
+ unsigned user_pointer_lo;
+ unsigned user_pointer_hi;
+ enum {
+ drm_bo_create,
+ drm_bo_validate,
+ drm_bo_map,
+ drm_bo_fence,
+ drm_bo_destroy,
+ drm_bo_reference,
+ drm_bo_unreference
+ } op;
+} drm_bo_arg_request_t;
+
+typedef struct drm_bo_arg_reply {
+ int ret;
+ unsigned handle;
+ unsigned flags;
+ unsigned size_lo;
+ unsigned size_hi;
+ unsigned offset_lo;
+ unsigned offset_hi;
+ unsigned arg_handle;
+ unsigned map_flags;
+}drm_bo_arg_reply_t;
+
+
+typedef union drm_bo_arg_data {
+ drm_bo_arg_request_t req;
+ drm_bo_arg_reply_t rep;
+} drm_bo_arg_data_t;
+
+
/**
* \name Ioctls Definitions
*/
@@ -694,6 +815,9 @@ typedef struct drm_set_version {
#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, drm_wait_vblank_t)
+#define DRM_IOCTL_FENCE DRM_IOWR(0x3b, drm_fence_arg_t)
+#define DRM_IOCTL_TTM DRM_IOWR(0x3c, drm_ttm_arg_t)
+
/*@}*/
/**
@@ -704,5 +828,6 @@ typedef struct drm_set_version {
* drmCommandReadWrite().
*/
#define DRM_COMMAND_BASE 0x40
+#define DRM_COMMAND_END 0x80
#endif