diff options
Diffstat (limited to 'include/drm/drm.h')
-rw-r--r-- | include/drm/drm.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h index 3919a4f792ae..0114ac94f969 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -36,17 +36,27 @@ | |||
36 | #ifndef _DRM_H_ | 36 | #ifndef _DRM_H_ |
37 | #define _DRM_H_ | 37 | #define _DRM_H_ |
38 | 38 | ||
39 | #if defined(__linux__) | ||
40 | |||
39 | #include <linux/types.h> | 41 | #include <linux/types.h> |
40 | #include <asm/ioctl.h> /* For _IO* macros */ | 42 | #include <asm/ioctl.h> |
41 | #define DRM_IOCTL_NR(n) _IOC_NR(n) | 43 | typedef unsigned int drm_handle_t; |
42 | #define DRM_IOC_VOID _IOC_NONE | 44 | |
43 | #define DRM_IOC_READ _IOC_READ | 45 | #else /* One of the BSDs */ |
44 | #define DRM_IOC_WRITE _IOC_WRITE | ||
45 | #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE | ||
46 | #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) | ||
47 | 46 | ||
48 | #define DRM_MAJOR 226 | 47 | #include <sys/ioccom.h> |
49 | #define DRM_MAX_MINOR 15 | 48 | #include <sys/types.h> |
49 | typedef int8_t __s8; | ||
50 | typedef uint8_t __u8; | ||
51 | typedef int16_t __s16; | ||
52 | typedef uint16_t __u16; | ||
53 | typedef int32_t __s32; | ||
54 | typedef uint32_t __u32; | ||
55 | typedef int64_t __s64; | ||
56 | typedef uint64_t __u64; | ||
57 | typedef unsigned long drm_handle_t; | ||
58 | |||
59 | #endif | ||
50 | 60 | ||
51 | #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ | 61 | #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ |
52 | #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ | 62 | #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ |
@@ -59,7 +69,6 @@ | |||
59 | #define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) | 69 | #define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) |
60 | #define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) | 70 | #define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT)) |
61 | 71 | ||
62 | typedef unsigned int drm_handle_t; | ||
63 | typedef unsigned int drm_context_t; | 72 | typedef unsigned int drm_context_t; |
64 | typedef unsigned int drm_drawable_t; | 73 | typedef unsigned int drm_drawable_t; |
65 | typedef unsigned int drm_magic_t; | 74 | typedef unsigned int drm_magic_t; |