summaryrefslogtreecommitdiff
path: root/libdrm/xf86drm.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86drm.h')
-rw-r--r--libdrm/xf86drm.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index 48a18f29..34c9ec0e 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -36,6 +36,8 @@
#ifndef _XF86DRM_H_
#define _XF86DRM_H_
+#include <stdarg.h>
+#include <sys/types.h>
#include <drm.h>
/* Defaults, if nothing set in xf86config */
@@ -61,6 +63,21 @@
typedef unsigned int drmSize, *drmSizePtr; /**< For mapped regions */
typedef void *drmAddress, **drmAddressPtr; /**< For mapped regions */
+typedef struct _drmServerInfo {
+ int (*debug_print)(const char *format, va_list ap);
+ int (*load_module)(const char *name);
+ void (*get_perms)(gid_t *, mode_t *);
+} drmServerInfo, *drmServerInfoPtr;
+
+typedef struct drmHashEntry {
+ int fd;
+ void (*f)(int, void *, void *);
+ void *tagTable;
+} drmHashEntry;
+
+extern void *drmGetHashTable(void);
+extern drmHashEntry *drmGetEntry(int fd);
+
/**
* Driver version information.
*
@@ -149,7 +166,8 @@ typedef enum {
DRM_PAGE_ALIGN = 0x01,
DRM_AGP_BUFFER = 0x02,
DRM_SG_BUFFER = 0x04,
- DRM_FB_BUFFER = 0x08
+ DRM_FB_BUFFER = 0x08,
+ DRM_PCI_BUFFER_RO = 0x10
} drmBufDescFlags;
typedef enum {
@@ -252,6 +270,8 @@ typedef struct _drmTextureRegion {
typedef enum {
DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
+ DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
+ DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
DRM_VBLANK_SIGNAL = 0x40000000 /* Send signal instead of blocking */
} drmVBlankSeqType;
@@ -280,7 +300,6 @@ typedef struct _drmSetVersion {
int drm_dd_minor;
} drmSetVersion, *drmSetVersionPtr;
-
#define __drm_dummy_lock(lock) (*(__volatile__ unsigned int *)lock)
#define DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */
@@ -484,6 +503,8 @@ do { register unsigned int __old __asm("o0"); \
} \
} while(0)
+
+
/* General user-level programmer's API: unprivileged */
extern int drmAvailable(void);
extern int drmOpen(const char *name, const char *busid);
@@ -544,6 +565,9 @@ extern int drmSwitchToContext(int fd, drm_context_t context);
extern int drmDestroyContext(int fd, drm_context_t handle);
extern int drmCreateDrawable(int fd, drm_drawable_t * handle);
extern int drmDestroyDrawable(int fd, drm_drawable_t handle);
+extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
+ drm_drawable_info_type_t type,
+ unsigned int num, void *data);
extern int drmCtlInstHandler(int fd, int irq);
extern int drmCtlUninstHandler(int fd);
@@ -597,6 +621,7 @@ extern int drmScatterGatherFree(int fd, drm_handle_t handle);
extern int drmWaitVBlank(int fd, drmVBlankPtr vbl);
/* Support routines */
+extern void drmSetServerInfo(drmServerInfoPtr info);
extern int drmError(int err, const char *label);
extern void *drmMalloc(int size);
extern void drmFree(void *pt);
@@ -630,4 +655,9 @@ extern int drmSLLookupNeighbors(void *l, unsigned long key,
unsigned long *prev_key, void **prev_value,
unsigned long *next_key, void **next_value);
+extern int drmOpenOnce(void *unused, const char *BusID, int *newlyopened);
+extern void drmCloseOnce(int fd);
+
+#include "xf86mm.h"
+
#endif