1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef __OMAP_DRM_H__
22 #define __OMAP_DRM_H__
23
24 #include "drm.h"
25
26 #if defined(__cplusplus)
27 extern "C" {
28 #endif
29
30
31
32
33
34 #define OMAP_PARAM_CHIPSET_ID 1
35
36 struct drm_omap_param {
37 __u64 param;
38 __u64 value;
39 };
40
41 #define OMAP_BO_SCANOUT 0x00000001
42 #define OMAP_BO_CACHE_MASK 0x00000006
43 #define OMAP_BO_TILED_MASK 0x00000f00
44
45
46 #define OMAP_BO_CACHED 0x00000000
47 #define OMAP_BO_WC 0x00000002
48 #define OMAP_BO_UNCACHED 0x00000004
49
50
51 #define OMAP_BO_TILED_8 0x00000100
52 #define OMAP_BO_TILED_16 0x00000200
53 #define OMAP_BO_TILED_32 0x00000300
54 #define OMAP_BO_TILED (OMAP_BO_TILED_8 | OMAP_BO_TILED_16 | OMAP_BO_TILED_32)
55
56 union omap_gem_size {
57 __u32 bytes;
58 struct {
59 __u16 width;
60 __u16 height;
61 } tiled;
62 };
63
64 struct drm_omap_gem_new {
65 union omap_gem_size size;
66 __u32 flags;
67 __u32 handle;
68 __u32 __pad;
69 };
70
71
72 enum omap_gem_op {
73 OMAP_GEM_READ = 0x01,
74 OMAP_GEM_WRITE = 0x02,
75 };
76
77 struct drm_omap_gem_cpu_prep {
78 __u32 handle;
79 __u32 op;
80 };
81
82 struct drm_omap_gem_cpu_fini {
83 __u32 handle;
84 __u32 op;
85
86
87
88
89 __u32 nregions;
90 __u32 __pad;
91 };
92
93 struct drm_omap_gem_info {
94 __u32 handle;
95 __u32 pad;
96 __u64 offset;
97
98
99
100
101
102
103 __u32 size;
104 __u32 __pad;
105 };
106
107 #define DRM_OMAP_GET_PARAM 0x00
108 #define DRM_OMAP_SET_PARAM 0x01
109 #define DRM_OMAP_GEM_NEW 0x03
110 #define DRM_OMAP_GEM_CPU_PREP 0x04
111 #define DRM_OMAP_GEM_CPU_FINI 0x05
112 #define DRM_OMAP_GEM_INFO 0x06
113 #define DRM_OMAP_NUM_IOCTLS 0x07
114
115 #define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param)
116 #define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param)
117 #define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new)
118 #define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep)
119 #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini)
120 #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info)
121
122 #if defined(__cplusplus)
123 }
124 #endif
125
126 #endif