1 /*
2  * This header was generated from the Linux kernel headers by update_headers.py,
3  * to provide necessary information from kernel to userspace, such as constants,
4  * structures, and macros, and thus, contains no copyrightable information.
5  */
6 #ifndef __OMAP_DRM_H__
7 #define __OMAP_DRM_H__
8 #include "drm.h"
9 #if defined(__cplusplus)
10 extern "C" {
11 #endif
12 #define OMAP_PARAM_CHIPSET_ID	1
13 struct drm_omap_param {
14 	__u64 param;
15 	__u64 value;
16 };
17 #define OMAP_BO_SCANOUT		0x00000001
18 #define OMAP_BO_CACHE_MASK	0x00000006
19 #define OMAP_BO_TILED_MASK	0x00000f00
20 #define OMAP_BO_CACHED		0x00000000
21 #define OMAP_BO_WC		0x00000002
22 #define OMAP_BO_UNCACHED	0x00000004
23 #define OMAP_BO_TILED_8		0x00000100
24 #define OMAP_BO_TILED_16	0x00000200
25 #define OMAP_BO_TILED_32	0x00000300
26 #define OMAP_BO_TILED		(OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
27 union omap_gem_size {
28 	__u32 bytes;
29 	struct {
30 		__u16 width;
31 		__u16 height;
32 	} tiled;
33 };
34 struct drm_omap_gem_new {
35 	union omap_gem_size size;
36 	__u32 flags;
37 	__u32 handle;
38 	__u32 __pad;
39 };
40 enum omap_gem_op {
41 	OMAP_GEM_READ = 0x01,
42 	OMAP_GEM_WRITE = 0x02,
43 };
44 struct drm_omap_gem_cpu_prep {
45 	__u32 handle;
46 	__u32 op;
47 };
48 struct drm_omap_gem_cpu_fini {
49 	__u32 handle;
50 	__u32 op;
51 
52 	__u32 nregions;
53 	__u32 __pad;
54 };
55 struct drm_omap_gem_info {
56 	__u32 handle;
57 	__u32 pad;
58 	__u64 offset;
59 
60 	__u32 size;
61 	__u32 __pad;
62 };
63 #define DRM_OMAP_GET_PARAM		0x00
64 #define DRM_OMAP_SET_PARAM		0x01
65 #define DRM_OMAP_GEM_NEW		0x03
66 #define DRM_OMAP_GEM_CPU_PREP		0x04
67 #define DRM_OMAP_GEM_CPU_FINI		0x05
68 #define DRM_OMAP_GEM_INFO		0x06
69 #define DRM_OMAP_NUM_IOCTLS		0x07
70 #define DRM_IOCTL_OMAP_GET_PARAM	DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
71 #define DRM_IOCTL_OMAP_SET_PARAM	DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
72 #define DRM_IOCTL_OMAP_GEM_NEW		DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
73 #define DRM_IOCTL_OMAP_GEM_CPU_PREP	DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
74 #define DRM_IOCTL_OMAP_GEM_CPU_FINI	DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
75 #define DRM_IOCTL_OMAP_GEM_INFO		DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
76 #if defined(__cplusplus)
77 }
78 #endif
79 #endif
80